diff kitten: Clear the search when pressing Esc
This commit is contained in:
parent
1022d8a0ee
commit
84b99b1b3d
@ -67,7 +67,7 @@ Keyboard controls
|
||||
========================= ===========================
|
||||
Action Shortcut
|
||||
========================= ===========================
|
||||
Quit :kbd:`q, Ctrl+c`
|
||||
Quit :kbd:`q, Ctrl+c, Esc`
|
||||
Scroll line up :kbd:`k, up`
|
||||
Scroll line down :kbd:`j, down`
|
||||
Scroll page up :kbd:`PgUp`
|
||||
@ -84,6 +84,7 @@ All lines of context :kbd:`a`
|
||||
Restore default context :kbd:`=`
|
||||
Search forwards :kbd:`/`
|
||||
Search backwards :kbd:`?`
|
||||
Clear search :kbd:`Esc`
|
||||
Scroll to next match :kbd:`>, .`
|
||||
Scroll to previous match :kbd:`<, ,`
|
||||
========================= ===========================
|
||||
|
||||
@ -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)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user