Skip to content

Commit 727aebb

Browse files
add another sequence that can be ctrl-left/right
1 parent bc6ead2 commit 727aebb

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

bpython/curtsiesfrontend/manual_readline.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ def end_of_line(cursor_offset, line):
4242
@on('\x1bf')
4343
@on('\x1bl')
4444
@on('\x1bOC')
45+
@on('\x1b[5C')
4546
def forward_word(cursor_offset, line):
4647
patt = r"\S\s"
4748
match = re.search(patt, line[cursor_offset:]+' ')
@@ -51,6 +52,7 @@ def forward_word(cursor_offset, line):
5152
@on('\x1bb')
5253
@on('\x1bOD')
5354
@on('\x1bB')
55+
@on('\x1b[5D')
5456
def back_word(cursor_offset, line):
5557
return (last_word_pos(line[:cursor_offset]), line)
5658

0 commit comments

Comments
 (0)