Skip to content

Commit

Permalink
fix f<S-Space>
Browse files Browse the repository at this point in the history
  • Loading branch information
nightwing committed Feb 12, 2024
1 parent bcd2130 commit 8180884
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/vim.js
Original file line number Diff line number Diff line change
Expand Up @@ -3414,9 +3414,11 @@ export function initVim(CodeMirror) {
if (selectedCharacter.length > 1){
switch(selectedCharacter){
case '<CR>':
case '<S-CR>':
selectedCharacter='\n';
break;
case '<Space>':
case '<S-Space>':
selectedCharacter=' ';
break;
default:
Expand Down
1 change: 1 addition & 0 deletions test/vim_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,7 @@ testMotion('$', ['v', '$'], makeCursor(0, lines[0].length), makeCursor(0, 1));
testMotion('f', ['f', 'p'], pChars[0], makeCursor(charLine.line, 0));
testMotion('f_repeat', ['2', 'f', 'p'], pChars[2], pChars[0]);
testMotion('f_num', ['f', '2'], numChars[2], makeCursor(charLine.line, 0));
testMotion('f<S-Space>', ['f', '<S-Space>'], offsetCursor(word1.end, 0, 1), word1.start);
testMotion('t', ['t','p'], offsetCursor(pChars[0], 0, -1),
makeCursor(charLine.line, 0));
testMotion('t_repeat', ['2', 't', 'p'], offsetCursor(pChars[2], 0, -1),
Expand Down

0 comments on commit 8180884

Please sign in to comment.