diff --git a/IPython/terminal/ptshell.py b/IPython/terminal/ptshell.py index c710ac5..3e52160 100644 --- a/IPython/terminal/ptshell.py +++ b/IPython/terminal/ptshell.py @@ -132,7 +132,7 @@ class TerminalInteractiveShell(InteractiveShell): else: b.insert_text('\n' + (' ' * (indent or 0))) - @kbmanager.registry.add_binding(Keys.ControlC) + @kbmanager.registry.add_binding(Keys.ControlC, filter=HasFocus(DEFAULT_BUFFER)) def _(event): event.current_buffer.reset()