diff options
Diffstat (limited to 'src/nvim/regexp.c')
-rw-r--r-- | src/nvim/regexp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/regexp.c b/src/nvim/regexp.c index 70584c2a6c..e81df736a4 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 || rex.reg_maxline == 0) { return false; } |