diff options
Diffstat (limited to 'src/search.c')
-rw-r--r-- | src/search.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/search.c b/src/search.c index 5e370b899f..bcb23aa7e9 100644 --- a/src/search.c +++ b/src/search.c @@ -521,6 +521,7 @@ searchit(win, buf, pos, dir, pat, count, options, pat_use) int match_ok; long nmatched; int submatch = 0; + int save_called_emsg = called_emsg; #ifdef FEAT_SEARCH_EXTRA int break_loop = FALSE; #else @@ -552,9 +553,9 @@ searchit(win, buf, pos, dir, pat, count, options, pat_use) else extra_col = 1; -/* - * find the string - */ + /* + * find the string + */ called_emsg = FALSE; do /* loop for count */ { @@ -865,6 +866,8 @@ searchit(win, buf, pos, dir, pat, count, options, pat_use) vim_free(regmatch.regprog); + called_emsg |= save_called_emsg; + if (!found) /* did not find it */ { if (got_int) |