summaryrefslogtreecommitdiff
path: root/src/search.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2013-11-28 19:27:30 +0100
committerBram Moolenaar <Bram@vim.org>2013-11-28 19:27:30 +0100
commitba2d44f33863e115b1858ab572829f403ad21883 (patch)
tree362d1fb55a4e860fef7bfd3e7a978dffd62b8d2d /src/search.c
parentb95186fd36bae9716181bfdd203fb27f410e3c4f (diff)
downloadvim-git-ba2d44f33863e115b1858ab572829f403ad21883.tar.gz
updated for version 7.4.110v7.4.110
Problem: "gUgn" cannot be repeeated. (Dimitar Dimitrov) Solution: Don't put "gn" in a different order in the redo buffer. Restore 'wrapscan' when the pattern isn't found. (Christian Wellenbrock)
Diffstat (limited to 'src/search.c')
-rw-r--r--src/search.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/search.c b/src/search.c
index 2fb7624c4..d97dcf6bd 100644
--- a/src/search.c
+++ b/src/search.c
@@ -4544,7 +4544,10 @@ current_search(count, forward)
/* Is the pattern is zero-width? */
one_char = is_one_char(spats[last_idx].pat);
if (one_char == -1)
- return FAIL; /* invalid pattern */
+ {
+ p_ws = old_p_ws;
+ return FAIL; /* pattern not found */
+ }
/*
* The trick is to first search backwards and then search forward again,