Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 26a0653

Browse files
committed
Make exiting FindMode with <esc> work as it should again
This undoes the effect of the breaking refactor in 73f66f2, where PostFindMode was entered whenever FindMode was exited, instead of only when it was exited with <enter>.
1 parent 34453f7 commit 26a0653

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

content_scripts/hud.coffee

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,15 @@ HUD =
7474

7575
if event.keyCode == keyCodes.enter
7676
handleEnterForFindMode()
77+
if FindMode.query.hasResults
78+
postExit = -> new PostFindMode
7779
else if KeyboardUtils.isEscape event
7880
# We don't want FindMode to handle the click events that handleEscapeForFindMode can generate, so we
7981
# wait until the mode is closed before running it.
8082
postExit = handleEscapeForFindMode
8183

8284
@findMode.exit()
8385
postExit?()
84-
new PostFindMode if FindMode.query.hasResults
8586

8687
isReady: do ->
8788
ready = false

0 commit comments

Comments
 (0)