Skip to content

Commit 2611440

Browse files
more option keys
--HG-- branch : scroll-frontend
1 parent 63c174d commit 2611440

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

bpython/scrollfrontend/manual_readline.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ def end_of_line(cursor_offset, line):
4545
return len(line), line
4646

4747
@on('f')
48+
@on('l')
4849
@on('\x1bOC')
4950
def forward_word(cursor_offset, line):
5051
patt = r"\S\s"
@@ -123,6 +124,18 @@ def transpose_word_before_cursor(cursor_offset, line):
123124

124125
# bonus functions (not part of readline)
125126

127+
@on('r')
128+
def delete_line(cursor_offset, line):
129+
return 0, ""
130+
131+
@on('u')
132+
def uppercase_next_word(cursor_offset, line):
133+
raise NotImplementedError()
134+
135+
@on('c')
136+
def titlecase_next_word(cursor_offset, line):
137+
raise NotImplementedError()
138+
126139
@on('\x1b\x7f')
127140
@on('\xff')
128141
def delete_word_from_cursor_back(cursor_offset, line):

bpython/scrollfrontend/repl.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ def process_event(self, e):
245245
elif e in ("\n", "\r", "PAD_ENTER"):
246246
self.on_enter()
247247
self.update_completion()
248-
elif e in ["", "", "\x00", "\x11"]:
248+
elif e in ["\x00", "\x11"]:
249249
pass #dunno what these are, but they screw things up #TODO find out
250250
#TODO use a whitelist instead of a blacklist!
251251
elif e == '\t': # tab

0 commit comments

Comments
 (0)