Skip to content

Commit 42a7023

Browse files
committed
Fix #3332
1 parent 14b33a8 commit 42a7023

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

kittens/diff/main.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -504,6 +504,20 @@ def on_key_event(self, key_event: KeyEvent, in_bracketed_paste: bool = False) ->
504504
self.state = DIFFED
505505
self.draw_status_line()
506506
return
507+
if key_event.matches('enter'):
508+
self.state = DIFFED
509+
self.do_search()
510+
self.line_edit.clear()
511+
self.draw_screen()
512+
return
513+
if key_event.matches('esc'):
514+
self.state = DIFFED
515+
self.draw_status_line()
516+
return
517+
if self.state >= DIFFED and self.current_search is not None and key_event.matches('esc'):
518+
self.current_search = None
519+
self.draw_screen()
520+
return
507521
if key_event.type is EventType.RELEASE:
508522
return
509523
action = self.shortcut_action(key_event)

0 commit comments

Comments
 (0)