mirror of
https://github.com/neovim/neovim.git
synced 2025-10-09 03:16:31 +00:00
vim-patch:9.0.1172: when 'selection' is "exclusive" then "1v" is one char short (#21735)
Problem: When 'selection' is "exclusive" then "1v" is one char short.
Solution: Add one character when 'selection' is "exclusive. (closes vim/vim#11791)
79c11e399b
Cherry-pick update_curswant_force() refactor from patch 9.0.0482.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
@@ -379,12 +379,19 @@ static bool check_top_offset(void)
|
||||
return false;
|
||||
}
|
||||
|
||||
/// Update w_curswant.
|
||||
void update_curswant_force(void)
|
||||
{
|
||||
validate_virtcol();
|
||||
curwin->w_curswant = curwin->w_virtcol;
|
||||
curwin->w_set_curswant = false;
|
||||
}
|
||||
|
||||
/// Update w_curswant if w_set_curswant is set.
|
||||
void update_curswant(void)
|
||||
{
|
||||
if (curwin->w_set_curswant) {
|
||||
validate_virtcol();
|
||||
curwin->w_curswant = curwin->w_virtcol;
|
||||
curwin->w_set_curswant = false;
|
||||
update_curswant_force();
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user