aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/regexp.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-12-03 21:44:13 +0800
committerGitHub <noreply@github.com>2022-12-03 21:44:13 +0800
commite642825e281b7a9f259b8bc0b83b94a78b18a2c4 (patch)
tree846f82101d13a45c8c5faf26971472ea880af4ea /src/nvim/regexp.c
parentc768b578faba671beab435954dc4e5a321c94728 (diff)
parent0cb90114d4c4801457e286c9b72ad0f394877d05 (diff)
downloadrneovim-e642825e281b7a9f259b8bc0b83b94a78b18a2c4.tar.gz
rneovim-e642825e281b7a9f259b8bc0b83b94a78b18a2c4.tar.bz2
rneovim-e642825e281b7a9f259b8bc0b83b94a78b18a2c4.zip
Merge pull request #21274 from zeertzjq/vim-8.2.3992
vim-patch:8.2.{3992,4261,4262},9.0.{0110,0577}
Diffstat (limited to 'src/nvim/regexp.c')
-rw-r--r--src/nvim/regexp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/regexp.c b/src/nvim/regexp.c
index 70584c2a6c..e58a8fa06a 100644
--- a/src/nvim/regexp.c
+++ b/src/nvim/regexp.c
@@ -1094,8 +1094,8 @@ static bool reg_match_visual(void)
colnr_T start2, end2;
colnr_T curswant;
- // Check if the buffer is the current buffer.
- if (rex.reg_buf != curbuf || VIsual.lnum == 0) {
+ // Check if the buffer is the current buffer and not using a string.
+ if (rex.reg_buf != curbuf || VIsual.lnum == 0 || !REG_MULTI) {
return false;
}