Skip to content

Commit

Permalink
Minor optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
boris-petrov committed Mar 30, 2014
1 parent 9e496b2 commit c994baa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion coffee/frontend/modules/key-event.coffee
Expand Up @@ -119,10 +119,11 @@ class window.KeyEvent
currentKeys = ''
else
# Check if there are any bindings that partially match
numberInsertMode = Number insertMode
startsWithKey = (command, key) ->
command is key or
(command.startsWith(key) and not command.startsWith '<')
for command, modes of bindings when modes[Number insertMode]? and startsWithKey command, keys
for command, modes of bindings when modes[numberInsertMode]? and startsWithKey command, keys
someBindingMatched = true
do stopPropagation
do showStatusLine
Expand Down

0 comments on commit c994baa

Please sign in to comment.