Skip to content

Commit 577b9c7

Browse files
use configurable keys for right arrow completion
1 parent e3dfb4f commit 577b9c7

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

bpython/curtsiesfrontend/repl.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -594,9 +594,12 @@ def process_key_event(self, e):
594594
if self.stdin.has_focus:
595595
return self.stdin.process_event(e)
596596

597-
if (e in ("<RIGHT>", '<Ctrl-f>', '<Ctrl-e>') and
598-
self.config.curtsies_right_arrow_completion and
599-
self.cursor_offset == len(self.current_line)):
597+
if (e in (key_dispatch[self.config.right_key] +
598+
key_dispatch[self.config.end_of_line_key] +
599+
("<RIGHT>",))
600+
and self.config.curtsies_right_arrow_completion
601+
and self.cursor_offset == len(self.current_line)):
602+
600603
self.current_line += self.current_suggestion
601604
self.cursor_offset = len(self.current_line)
602605
elif e in ("<UP>",) + key_dispatch[self.config.up_one_line_key]:

0 commit comments

Comments
 (0)