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