0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

patch 9.0.1172: when 'selection' is "exclusive" then "1v" is one char short

Problem:    When 'selection' is "exclusive" then "1v" is one char short.
Solution:   Add one character when 'selection' is "exclusive. (closes #11791)
This commit is contained in:
Bram Moolenaar
2023-01-10 17:29:29 +00:00
parent 2bc849ff81
commit 79c11e399b
3 changed files with 17 additions and 1 deletions

View File

@@ -5472,7 +5472,9 @@ nv_visual(cmdarg_T *cap)
if (resel_VIsual_line_count <= 1)
{
update_curswant_force();
curwin->w_curswant += resel_VIsual_vcol * cap->count0 - 1;
curwin->w_curswant += resel_VIsual_vcol * cap->count0;
if (*p_sel != 'e')
--curwin->w_curswant;
}
else
curwin->w_curswant = resel_VIsual_vcol;