Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Adding ctrl-a/ctrl-e to pudb commandline
  • Loading branch information
FoxLisk committed Jan 24, 2015
1 parent 2d5ac41 commit 8728fc3
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pudb/debugger.py
Expand Up @@ -1476,6 +1476,12 @@ def cmdline_history_prev(w, size, key):
def cmdline_history_next(w, size, key):
cmdline_history_browse(1)

def cmdline_start_of_line(w, size, key):
self.cmdline_edit.edit_pos = 0

def cmdline_end_of_line(w, size, key):
self.cmdline_edit.edit_pos = len(self.cmdline_edit.edit_text)

def toggle_cmdline_focus(w, size, key):
self.columns.set_focus(self.lhs_col)
if self.lhs_col.get_focus() is self.cmdline_sigwrap:
Expand All @@ -1491,6 +1497,8 @@ def toggle_cmdline_focus(w, size, key):
self.cmdline_edit_sigwrap.listen("ctrl p", cmdline_history_prev)
self.cmdline_edit_sigwrap.listen("esc", toggle_cmdline_focus)
self.cmdline_edit_sigwrap.listen("ctrl d", toggle_cmdline_focus)
self.cmdline_edit_sigwrap.listen("ctrl a", cmdline_start_of_line)
self.cmdline_edit_sigwrap.listen("ctrl e", cmdline_end_of_line)

self.top.listen("ctrl x", toggle_cmdline_focus)

Expand Down

0 comments on commit 8728fc3

Please sign in to comment.