Mercurial > vim
comparison src/gui.c @ 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 | c07caeb90a35 |
children | 60db35a20823 |
comparison
equal
deleted
inserted
replaced
9304:07ee18c90e3a | 9305:4981cd0802c7 |
---|---|
5346 u_sync(FALSE); | 5346 u_sync(FALSE); |
5347 do_cmdline_cmd(ga.ga_data); | 5347 do_cmdline_cmd(ga.ga_data); |
5348 } | 5348 } |
5349 else | 5349 else |
5350 { | 5350 { |
5351 /* Search for the next match. */ | 5351 int searchflags = SEARCH_MSG + SEARCH_MARK; |
5352 | |
5353 /* Search for the next match. | |
5354 * Don't skip text under cursor for single replace. */ | |
5355 if (type == FRD_REPLACE) | |
5356 searchflags += SEARCH_START; | |
5352 i = msg_scroll; | 5357 i = msg_scroll; |
5353 (void)do_search(NULL, down ? '/' : '?', ga.ga_data, 1L, | 5358 (void)do_search(NULL, down ? '/' : '?', ga.ga_data, 1L, |
5354 SEARCH_MSG + SEARCH_MARK, NULL); | 5359 searchflags, NULL); |
5355 msg_scroll = i; /* don't let an error message set msg_scroll */ | 5360 msg_scroll = i; /* don't let an error message set msg_scroll */ |
5356 } | 5361 } |
5357 | 5362 |
5358 /* Don't want to pass did_emsg to other code, it may cause disabling | 5363 /* Don't want to pass did_emsg to other code, it may cause disabling |
5359 * syntax HL if we were busy redrawing. */ | 5364 * syntax HL if we were busy redrawing. */ |