From e92b9db2aeaa09b1855900936252e27e3535f9da Mon Sep 17 00:00:00 2001 From: mrmr1993 Date: Tue, 2 Jun 2015 17:09:00 +0100 Subject: Handle up and down keys directly in the HUD --- content_scripts/hud.coffee | 9 --------- content_scripts/vimium_frontend.coffee | 2 -- 2 files changed, 11 deletions(-) (limited to 'content_scripts') diff --git a/content_scripts/hud.coffee b/content_scripts/hud.coffee index c64670ee..9eeb4579 100644 --- a/content_scripts/hud.coffee +++ b/content_scripts/hud.coffee @@ -88,15 +88,6 @@ HUD = handleEnterForFindMode() findMode.exit() new PostFindMode if findModeQueryHasResults - else if event.keyCode == keyCodes.upArrow - if rawQuery = FindModeHistory.getQuery findMode.historyIndex + 1 - findMode.historyIndex += 1 - findMode.partialQuery = findModeQuery.rawQuery if findMode.historyIndex == 0 - HUD.showFindMode rawQuery - else if event.keyCode == keyCodes.downArrow - findMode.historyIndex = Math.max -1, findMode.historyIndex - 1 - rawQuery = if 0 <= findMode.historyIndex then FindModeHistory.getQuery findMode.historyIndex else findMode.partialQuery - HUD.showFindMode rawQuery else if KeyboardUtils.isEscape event findMode.exit() handleEscapeForFindMode() diff --git a/content_scripts/vimium_frontend.coffee b/content_scripts/vimium_frontend.coffee index ef554cae..a6387da1 100644 --- a/content_scripts/vimium_frontend.coffee +++ b/content_scripts/vimium_frontend.coffee @@ -690,8 +690,6 @@ window.handleEnterForFindMode = -> class FindMode extends Mode constructor: (@options = {}) -> - @historyIndex = -1 - @partialQuery = "" if @options.returnToViewport @scrollX = window.scrollX @scrollY = window.scrollY -- cgit v1.2.3