1 utils = require 'utils'
3 commands = require 'commands'
15 constructor: (@window) ->
24 Object.defineProperty(this, 'findStr',
25 get: -> return Vim.findStr
26 set: (value) -> Vim.findStr = value
29 enterHintsMode: (@markers, @cb) ->
32 # TODO: This function should probably remove
33 # hint markers (if they are present) as well
36 @markers = @cb = undefined
38 handleKeyDown: (event, keyStr) ->
40 if @mode == MODE_NORMAL || keyStr == 'Esc'
43 if command = commands.findCommand(@keys)
45 return command.name != 'Esc'
46 else if commands.maybeCommand(@keys)
50 else if @mode == MODE_HINTS and not (event.ctrlKey or event.metaKey)
51 if utils.getHintChars().search(utils.regexpEscape(keyStr)) > -1 or keyStr in ['Space', 'Backspace']
52 commands.hintCharHandler(@, keyStr)
59 handleKeyPress: (event, keyStr) ->
60 return @lastKeyStr != 'Esc' and @suppress
62 handleKeyUp: (event) ->
65 return @lastKeyStr != 'Esc' and sup