aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/search.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/search.c')
-rw-r--r--src/nvim/search.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/nvim/search.c b/src/nvim/search.c
index 4ca0b25243..b386c6a7c4 100644
--- a/src/nvim/search.c
+++ b/src/nvim/search.c
@@ -3969,6 +3969,9 @@ static int find_next_quote(char_u *line, int col, int quotechar, char_u *escape)
return -1;
} else if (escape != NULL && vim_strchr(escape, c)) {
col++;
+ if (line[col] == NUL) {
+ return -1;
+ }
} else if (c == quotechar) {
break;
}