1 parent 50208a7 commit f74ba32Copy full SHA for f74ba32
1 file changed
Keymap.hs
@@ -86,13 +86,15 @@ searchMode stype = step where
86
step z = renderSearch stype z $> KeyMap (`dispatch` z)
87
88
dispatch c z
89
- | c == '\ESC' = clearMessage *> leave
+ | c `elem` ['\ESC', '\^C']
90
+ = clearMessage *> leave
91
| c `elem` enter' = commit z
92
| c `elem` delete' = step $ zipEdit dropLast z
93
| k == KeyUp = step $ zipUp z
94
| k == KeyDown = step $ zipDown z
95
| k == KeyDC = histDelete z
- | c > '\255' = step z -- ignore other special keys
96
+ | c < ' ' || c > '\255'
97
+ = step z -- ignore other special keys
98
| otherwise = step $ zipEdit (++ [c]) z
99
where k = charToKey c
100
0 commit comments