aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2024-12-17 09:03:26 +0800
committerGitHub <noreply@github.com>2024-12-17 09:03:26 +0800
commit15153c4cd5319652bcdcd608fe5d4f0fa1eb9419 (patch)
treea1c7d651870d90a102fe006d203f0060eb8711fa /src
parent137308a3c9b658c7dc9268201dfaea4d601b79c7 (diff)
downloadrneovim-15153c4cd5319652bcdcd608fe5d4f0fa1eb9419.tar.gz
rneovim-15153c4cd5319652bcdcd608fe5d4f0fa1eb9419.tar.bz2
rneovim-15153c4cd5319652bcdcd608fe5d4f0fa1eb9419.zip
vim-patch:9.1.0938: exclusive selection not respected when re-selecting block mode (#31603)
Problem: exclusive selection not respected when re-selecting block mode (Matt Ellis) Solution: advance selection by another character when using selection=exclusive and visual block mode fixes: vim/vim#16202 closes: vim/vim#16219 https://github.com/vim/vim/commit/bb955894734b287abfadd3a25786a42038d18d61 Co-authored-by: Christian Brabandt <cb@256bit.org>
Diffstat (limited to 'src')
-rw-r--r--src/nvim/normal.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/nvim/normal.c b/src/nvim/normal.c
index 4d2abf1c8c..a664535c0f 100644
--- a/src/nvim/normal.c
+++ b/src/nvim/normal.c
@@ -5038,6 +5038,9 @@ static void nv_visual(cmdarg_T *cap)
assert(cap->count0 >= INT_MIN && cap->count0 <= INT_MAX);
curwin->w_curswant += resel_VIsual_vcol * cap->count0 - 1;
curwin->w_cursor.lnum = lnum;
+ if (*p_sel == 'e') {
+ curwin->w_curswant++;
+ }
coladvance(curwin, curwin->w_curswant);
} else {
curwin->w_set_curswant = true;