This commit is contained in:
Kovid Goyal 2021-02-21 13:18:48 +05:30
parent 14b33a845e
commit 42a7023203
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -504,6 +504,20 @@ def on_key_event(self, key_event: KeyEvent, in_bracketed_paste: bool = False) ->
self.state = DIFFED
self.draw_status_line()
return
if key_event.matches('enter'):
self.state = DIFFED
self.do_search()
self.line_edit.clear()
self.draw_screen()
return
if key_event.matches('esc'):
self.state = DIFFED
self.draw_status_line()
return
if self.state >= DIFFED and self.current_search is not None and key_event.matches('esc'):
self.current_search = None
self.draw_screen()
return
if key_event.type is EventType.RELEASE:
return
action = self.shortcut_action(key_event)