summaryrefslogtreecommitdiff
path: root/src/search.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2021-04-02 18:55:57 +0200
committerBram Moolenaar <Bram@vim.org>2021-04-02 18:55:57 +0200
commit5b8cabfef7c3707f3e53e13844d90e5a217e1e84 (patch)
tree419de5d628c379b090538a811bb6d33270dcdd85 /src/search.c
parentdcf29ac87f4d7a62c503ba6de0d92c7779446bf2 (diff)
downloadvim-git-5b8cabfef7c3707f3e53e13844d90e5a217e1e84.tar.gz
patch 8.2.2694: when 'matchpairs' is empty every character beepsv8.2.2694
Problem: When 'matchpairs' is empty every character beeps. (Marco Hinz) Solution: Bail out when no character in 'matchpairs' was found. (closes #8053) Add assert_nobeep().
Diffstat (limited to 'src/search.c')
-rw-r--r--src/search.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/search.c b/src/search.c
index d8c21f43c..37ccc37e9 100644
--- a/src/search.c
+++ b/src/search.c
@@ -2817,6 +2817,8 @@ showmatch(
if (*p == NUL)
return;
}
+ if (*p == NUL)
+ return;
if ((lpos = findmatch(NULL, NUL)) == NULL) // no match, so beep
vim_beep(BO_MATCH);