File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ def process_event(self, e):
7171 else :
7272 self .request_greenlet .switch (False )
7373 self .escape ()
74- elif e in ['\x1b ' , ' \t ' , ' \x1b \t ' , ' \x1b \x1b ' ]:
74+ elif e in ['\x1b ' ]:
7575 self .request_greenlet .switch (False )
7676 self .escape ()
7777 else : # add normal character
@@ -120,7 +120,7 @@ def confirm(self, q):
120120 def file_prompt (self , s ):
121121 """Expected to return a file name, given """
122122 self .request_greenlet = greenlet .getcurrent ()
123- self .prompt = s . replace ( 'Esc' , 'Tab' )
123+ self .prompt = s
124124 self .in_prompt = True
125125 result = self .main_greenlet .switch (s )
126126 return result
Original file line number Diff line number Diff line change @@ -62,6 +62,8 @@ def process_event(self, e):
6262 self .current_line = ''
6363 self .cursor_offset_in_line = 0
6464 self .repl .run_code_and_maybe_finish ()
65+ elif e in ["\x1b " ]: #ESC
66+ pass
6567 else : # add normal character
6668 self .add_normal_character (e )
6769
@@ -337,6 +339,8 @@ def process_event(self, e):
337339 #TODO add PAD keys hack as in bpython.cli
338340 elif e in ["\x18 " ]:
339341 self .send_current_block_to_external_editor ()
342+ elif e in ["\x1b " ]: #ESC
343+ pass
340344 else :
341345 self .add_normal_character (e if len (e ) == 1 else e [- 1 ]) #strip control seq
342346 self .update_completion ()
You can’t perform that action at this time.
0 commit comments