We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2f03564 commit cc81e48Copy full SHA for cc81e48
2 files changed
src/vim.js
@@ -2682,11 +2682,9 @@ export function initVim(CM) {
2682
var repeat = motionArgs.repeat;
2683
var forward = motionArgs.forward === lastSearch.forward;
2684
var increment = (lastSearch.increment ? 1 : 0) * (forward ? -1 : 1);
2685
- cm.moveH(-increment, 'char');
2686
motionArgs.inclusive = forward ? true : false;
2687
- var curEnd = moveToCharacter(cm, repeat, forward, lastSearch.selectedCharacter);
+ var curEnd = moveToCharacter(cm, repeat, forward, lastSearch.selectedCharacter, offsetCursor(head, 0, -increment));
2688
if (!curEnd) {
2689
- cm.moveH(increment, 'char');
2690
return head;
2691
}
2692
curEnd.ch += increment;
test/vim_test.js
@@ -3877,6 +3877,23 @@ testVim('vFT', function(cm, vim, helpers) {
3877
helpers.doKeys('F', '1');
3878
helpers.assertCursorAt(0, 0);
3879
}, { value: '1123 123 123'});
3880
+testVim('vf,;', function(cm, vim, helpers) {
3881
+ helpers.doKeys('0', 'v')
3882
+ helpers.doKeys('f', '.');
3883
+ eq('ab.', cm.getSelection());
3884
+ helpers.doKeys(';');
3885
+ eq('ab.cd.', cm.getSelection());
3886
3887
+ eq('ab.cd.ef.', cm.getSelection());
3888
+ helpers.doKeys(',');
3889
3890
3891
3892
+ helpers.doKeys('2', ',');
3893
3894
3895
3896
+}, { value: 'ab.cd.ef.g'});
3897
testVim('page_motions', function(cm, vim, helpers) {
3898
var value = "x".repeat(200).split("").map((_, i)=>i).join("\n");
3899
cm.setValue(value);
0 commit comments