summaryrefslogtreecommitdiff
path: root/src/search.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-10-10 16:45:25 +0200
committerBram Moolenaar <Bram@vim.org>2020-10-10 16:45:25 +0200
commit28f224b2c1bd2fcdee7b4fe2c64826e1cff08f39 (patch)
tree97358abc990845e2b24a098e56f994f62d244ba4 /src/search.c
parentf57497276bc616d3856eeff9824c080941faa51b (diff)
downloadvim-git-28f224b2c1bd2fcdee7b4fe2c64826e1cff08f39.tar.gz
patch 8.2.1823: "gN" does not select the matched stringv8.2.1823
Problem: "gN" does not select the matched string. Solution: Move the cursor to the start of the match.
Diffstat (limited to 'src/search.c')
-rw-r--r--src/search.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/search.c b/src/search.c
index fd668383b..45e4f9c1a 100644
--- a/src/search.c
+++ b/src/search.c
@@ -3047,7 +3047,7 @@ current_search(
curwin->w_cursor = end_pos;
if (LT_POS(VIsual, end_pos) && forward)
dec_cursor();
- else if (VIsual_active && LT_POS(curwin->w_cursor, VIsual))
+ else if (VIsual_active && LT_POS(curwin->w_cursor, VIsual) && forward)
curwin->w_cursor = pos; // put the cursor on the start of the match
VIsual_active = TRUE;
VIsual_mode = 'v';