Skip to content

Commit

Permalink
Prevent s command in change mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Yukaii committed Apr 10, 2020
1 parent 758dce5 commit 6c9ecdc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion keymap/vim.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
{ keys: '<C-c>', type: 'keyToKey', toKeys: '<Esc>' },
{ keys: '<C-[>', type: 'keyToKey', toKeys: '<Esc>', context: 'insert' },
{ keys: '<C-c>', type: 'keyToKey', toKeys: '<Esc>', context: 'insert' },
{ keys: 's', type: 'keyToKey', toKeys: 'cl', context: 'normal' },
{ keys: 's', type: 'keyToKey', toKeys: 'cl', context: 'normal', excludeOperator: ['change'] },
{ keys: 's', type: 'keyToKey', toKeys: 'c', context: 'visual'},
{ keys: 'S', type: 'keyToKey', toKeys: 'cc', context: 'normal' },
{ keys: 'S', type: 'keyToKey', toKeys: 'VdO', context: 'visual' },
Expand Down Expand Up @@ -2861,6 +2861,7 @@
if (context == 'insert' && command.context != 'insert' ||
command.context && command.context != context ||
inputState.operator && command.type == 'action' ||
(command.excludeOperator && command.excludeOperator.includes(inputState.operator)) ||
!(match = commandMatch(keys, command.keys))) { continue; }
if (match == 'partial') { partial.push(command); }
if (match == 'full') { full.push(command); }
Expand Down

0 comments on commit 6c9ecdc

Please sign in to comment.