Skip to content

Commit

Permalink
Merge from 3.x: PR #5560
Browse files Browse the repository at this point in the history
Fixes #5558
  • Loading branch information
ccordoba12 committed Oct 24, 2017
2 parents 5c2bc87 + 7ae2297 commit 2d24af6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
10 changes: 7 additions & 3 deletions spyder/widgets/ipythonconsole/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -350,12 +350,16 @@ def add_actions_to_context_menu(self, menu):
icon=ima.icon('MessageBoxInformation'),
triggered=self.inspect_object)
clear_line_action = create_action(self, _("Clear line or block"),
QKeySequence("Shift+Escape"),
QKeySequence(get_shortcut(
'console',
'clear line')),
icon=ima.icon('editdelete'),
triggered=self.clear_line)
reset_namespace_action = create_action(self, _("Reset namespace"),
QKeySequence("Ctrl+Alt+R"),
triggered=self.reset_namespace)
QKeySequence(get_shortcut(
'ipython_console',
'reset namespace')),
triggered=self.reset_namespace)
clear_console_action = create_action(self, _("Clear console"),
QKeySequence(get_shortcut('console',
'clear shell')),
Expand Down
5 changes: 4 additions & 1 deletion spyder/widgets/ipythonconsole/shell.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,9 +283,12 @@ def create_shortcuts(self):
array_table = config_shortcut(self._control.enter_array_table,
context='array_builder',
name='enter array table', parent=self)
clear_line = config_shortcut(self.ipyclient.clear_line,
context='console', name='clear line',
parent=self)

return [inspect, clear_console, restart_kernel, new_tab,
reset_namespace, array_inline, array_table]
reset_namespace, array_inline, array_table, clear_line]

# --- To communicate with the kernel
def silent_execute(self, code):
Expand Down

0 comments on commit 2d24af6

Please sign in to comment.