changeset 9305:4981cd0802c7 v7.4.1935

commit https://github.com/vim/vim/commit/bee666f239eada035d288b77269aebc42f644ea6 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Jun 14 20:39:42 2016 +0200 patch 7.4.1935 Problem: When using the GUI search/replace a second match right after the replacement is skipped. Solution: Add the SEARCH_START flag. (Mleddy)
author Christian Brabandt <cb@256bit.org>
date Tue, 14 Jun 2016 20:45:06 +0200
parents 07ee18c90e3a
children 6eb5bb2b63de
files src/gui.c src/version.c
diffstat 2 files changed, 9 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/gui.c
+++ b/src/gui.c
@@ -5348,10 +5348,15 @@ gui_do_findrepl(
     }
     else
     {
-	/* Search for the next match. */
+	int searchflags = SEARCH_MSG + SEARCH_MARK;
+
+	/* Search for the next match.
+	 * Don't skip text under cursor for single replace. */
+	if (type == FRD_REPLACE)
+	    searchflags += SEARCH_START;
 	i = msg_scroll;
 	(void)do_search(NULL, down ? '/' : '?', ga.ga_data, 1L,
-					      SEARCH_MSG + SEARCH_MARK, NULL);
+							   searchflags, NULL);
 	msg_scroll = i;	    /* don't let an error message set msg_scroll */
     }
 
--- a/src/version.c
+++ b/src/version.c
@@ -754,6 +754,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    1935,
+/**/
     1934,
 /**/
     1933,