Skip to content

Commit

Permalink
Merge pull request #132 from alex-netquity/master
Browse files Browse the repository at this point in the history
Add ctrl-u binding to pudb command line.
  • Loading branch information
inducer committed Feb 11, 2015
2 parents 0399a3d + 4781b21 commit e9c8dd3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pudb/debugger.py
Expand Up @@ -1506,6 +1506,11 @@ def cmdline_del_word(w, size, key):
self.cmdline_edit.edit_text = before[i:][::-1] + after
self.cmdline_edit.edit_post = len(before[i:])

def cmdline_del_to_start_of_line(w, size, key):
pos = self.cmdline_edit.edit_pos
self.cmdline_edit.edit_text = self.cmdline_edit.edit_text[pos:]
self.cmdline_edit.edit_pos = 0

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 @@ -1524,6 +1529,7 @@ def toggle_cmdline_focus(w, size, key):
self.cmdline_edit_sigwrap.listen("ctrl a", cmdline_start_of_line)
self.cmdline_edit_sigwrap.listen("ctrl e", cmdline_end_of_line)
self.cmdline_edit_sigwrap.listen("ctrl w", cmdline_del_word)
self.cmdline_edit_sigwrap.listen("ctrl u", cmdline_del_to_start_of_line)

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

Expand Down

0 comments on commit e9c8dd3

Please sign in to comment.