Skip to content

Commit 8726ab6

Browse files
committed
[vim] Update LastHPos in visual only if not infinity
1 parent 461a303 commit 8726ab6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

keymap/vim.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1361,7 +1361,9 @@
13611361
selectionStart.ch -= 1;
13621362
curEnd.ch += 1;
13631363
}
1364-
vim.lastHPos = curEnd.ch;
1364+
if (vim.lastHPos != Infinity) {
1365+
vim.lastHPos = curEnd.ch;
1366+
}
13651367
selectionEnd = curEnd;
13661368
selectionStart = (motionResult instanceof Array) ? curStart : selectionStart;
13671369
if (vim.visualLine) {

0 commit comments

Comments
 (0)