diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2021-05-30 21:48:51 -0400 |
---|---|---|
committer | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2021-05-31 21:06:10 -0400 |
commit | 73e3669c7a8e2d4f63be17e0f93ee3c641f8806f (patch) | |
tree | cfe3f6682065d1b85d468be7b07d20cad5c3c06a /src/nvim/regexp.c | |
parent | 2a1bc8657a59a5af89a5ec2840a443c5a21e1c27 (diff) | |
download | rneovim-73e3669c7a8e2d4f63be17e0f93ee3c641f8806f.tar.gz rneovim-73e3669c7a8e2d4f63be17e0f93ee3c641f8806f.tar.bz2 rneovim-73e3669c7a8e2d4f63be17e0f93ee3c641f8806f.zip |
vim-patch:8.2.2911: pattern "\%V" does not match all of block selection
Problem: Pattern "\%V" does not match all of block selection. (Rick Howe)
Solution: Use the value of vi_curswant. (closes vim/vim#8285)
https://github.com/vim/vim/commit/e71c0ebe2cee4a4916c49e206733200299e4c065
Diffstat (limited to 'src/nvim/regexp.c')
-rw-r--r-- | src/nvim/regexp.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/nvim/regexp.c b/src/nvim/regexp.c index accf9b0bb5..6b84bb3207 100644 --- a/src/nvim/regexp.c +++ b/src/nvim/regexp.c @@ -3755,6 +3755,7 @@ static bool reg_match_visual(void) int mode; colnr_T start, end; colnr_T start2, end2; + colnr_T curswant; // Check if the buffer is the current buffer. if (rex.reg_buf != curbuf || VIsual.lnum == 0) { @@ -3770,6 +3771,7 @@ static bool reg_match_visual(void) bot = VIsual; } mode = VIsual_mode; + curswant = wp->w_curswant; } else { if (lt(curbuf->b_visual.vi_start, curbuf->b_visual.vi_end)) { top = curbuf->b_visual.vi_start; @@ -3779,6 +3781,7 @@ static bool reg_match_visual(void) bot = curbuf->b_visual.vi_start; } mode = curbuf->b_visual.vi_mode; + curswant = curbuf->b_visual.vi_curswant; } lnum = rex.lnum + rex.reg_firstlnum; if (lnum < top.lnum || lnum > bot.lnum) { @@ -3798,8 +3801,9 @@ static bool reg_match_visual(void) start = start2; if (end2 > end) end = end2; - if (top.col == MAXCOL || bot.col == MAXCOL) + if (top.col == MAXCOL || bot.col == MAXCOL || curswant == MAXCOL) { end = MAXCOL; + } unsigned int cols_u = win_linetabsize(wp, rex.line, (colnr_T)(rex.input - rex.line)); assert(cols_u <= MAXCOL); |