We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5255a46 commit 766fc16Copy full SHA for 766fc16
1 file changed
bpython/curtsiesfrontend/repl.py
@@ -71,7 +71,7 @@ def process_event(self, e):
71
self.repl.run_code_and_maybe_finish()
72
elif e in ["<ESC>"]:
73
pass
74
- elif e in ["\n", "\r"]:
+ elif e in ["\n", "\r", "<Ctrl-j>", "<Ctrl-m>"]:
75
line = self.current_line
76
self.repl.send_to_stdin(line + '\n')
77
self.has_focus = False
@@ -87,8 +87,11 @@ def process_event(self, e):
87
self.repl.send_to_stdin(self.current_line)
88
89
def add_input_character(self, e):
90
+ if e == '<SPACE>': e = ' '
91
+ if e.startswith('<') and e.endswith('>'): return
92
assert len(e) == 1, 'added multiple characters: %r' % e
93
logger.debug('adding normal char %r to current line', e)
94
+
95
c = e if py3 else e.encode('utf8')
96
self.current_line = (self.current_line[:self.cursor_offset] +
97
c +
0 commit comments