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:
@ -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:
|
||||
|
Reference in New Issue
Block a user