Editing doesn't interrupt InlineCommands anymore
@@ -14,6 +14,7 @@ from thonny.ui_utils import get_current_notebook_tab_widget, select_sequence
from thonny.common import parse_shell_command
from thonny.tktextext import rebind_control_a
import tokenize
+from thonny.shared.thonny.common import ToplevelCommand, DebuggerCommand
_dialog_filetypes = [('Python files', '.py .pyw'), ('text files', '.txt'), ('all files', '.*')]
@@ -187,7 +188,8 @@ class Editor(ttk.Frame):
def _on_text_change(self, event):
self.master.update_editor_title(self)
runner = get_runner()
- if runner.get_state() != "waiting_toplevel_command":
+ if (runner.get_state() in ["running", "waiting_input", "waiting_debugger_command"]
+ and isinstance(runner.get_current_command(), (ToplevelCommand, DebuggerCommand))): # exclude running InlineCommands
runner.interrupt_backend()
def destroy(self):
