aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/search.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/search.c')
-rw-r--r--src/nvim/search.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/nvim/search.c b/src/nvim/search.c
index 387614fd09..1eb1a25a19 100644
--- a/src/nvim/search.c
+++ b/src/nvim/search.c
@@ -3669,6 +3669,11 @@ current_quote (
/* Correct cursor when 'selection' is exclusive */
if (VIsual_active) {
+ // this only works within one line
+ if (VIsual.lnum != curwin->w_cursor.lnum) {
+ return false;
+ }
+
vis_bef_curs = lt(VIsual, curwin->w_cursor);
if (*p_sel == 'e' && vis_bef_curs)
dec_cursor();