File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ def process_event(self, e):
7171 self .repl .run_code_and_maybe_finish ()
7272 elif e in ["<ESC>" ]:
7373 pass
74- elif e in ["\n " , "\r " ]:
74+ elif e in ["\n " , "\r " , "<Ctrl-j>" , "<Ctrl-m>" ]:
7575 line = self .current_line
7676 self .repl .send_to_stdin (line + '\n ' )
7777 self .has_focus = False
@@ -87,8 +87,11 @@ def process_event(self, e):
8787 self .repl .send_to_stdin (self .current_line )
8888
8989 def add_input_character (self , e ):
90+ if e == '<SPACE>' : e = ' '
91+ if e .startswith ('<' ) and e .endswith ('>' ): return
9092 assert len (e ) == 1 , 'added multiple characters: %r' % e
9193 logger .debug ('adding normal char %r to current line' , e )
94+
9295 c = e if py3 else e .encode ('utf8' )
9396 self .current_line = (self .current_line [:self .cursor_offset ] +
9497 c +
You can’t perform that action at this time.
0 commit comments