diff options
author | Bram Moolenaar <Bram@vim.org> | 2016-06-14 20:39:42 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2016-06-14 20:39:42 +0200 |
commit | bee666f239eada035d288b77269aebc42f644ea6 (patch) | |
tree | 6e627e488bcffbd7fc5b13e1e4ab32249126d86a /src/gui.c | |
parent | 9bd31860521b53ad657c4d6d320d670e30a049f8 (diff) | |
download | vim-bee666f239eada035d288b77269aebc42f644ea6.zip |
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)
Diffstat (limited to 'src/gui.c')
-rw-r--r-- | src/gui.c | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -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 */ } |