plug-ins: Fix Python console crash after clear

GTK2 get_iter_at_line_offset() does not allow invalid offsets unlike
GTK3 version. Clearing the console creates an invalid iter due to an
empty buffer.

This patch attempts to resolve it by adding a ">>> " output when the
console is cleared, thus preventing the invalid iter issue.
This commit is contained in:
Alx Sa
2023-02-08 05:10:03 +00:00
committed by Jehan
parent a902576864
commit 3fbb96c36b

View File

@ -569,6 +569,7 @@ class _Console(_ReadLine, code.InteractiveInterpreter):
self.__start()
self.run_on_raw_input = start_script
self.raw_input(self.ps1)
def do_raw_input(self, text):
if self.cmd_buffer: