diff kitten: Clear the search when pressing Esc

This commit is contained in:
Kovid Goyal
2018-06-15 15:00:09 +05:30
parent 1022d8a0ee
commit 84b99b1b3d
2 changed files with 6 additions and 1 deletions

View File

@@ -390,6 +390,10 @@ class DiffHandler(Handler):
self.line_edit.clear()
self.draw_screen()
return
if self.state >= DIFFED and self.current_search is not None and key_event.key is ESCAPE:
self.current_search = None
self.draw_screen()
return
action = self.shortcut_action(key_event)
if action is not None:
return self.perform_action(action)