From 84de4d86553bd47ea8312b2fcc3c2bea9128611c Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Thu, 23 Jun 2022 19:34:43 +0800 Subject: vim-patch:8.2.5152: search() gets stuck with "c" and skip evaluates to true (#19064) Problem: search() gets stuck with "c" and skip evaluates to true. Solution: Reset the SEARCH_START option. (closes vim/vim#10608) https://github.com/vim/vim/commit/180246cfd1a5842c538fa8a4a0b520f1d95c90c7 --- src/nvim/eval/funcs.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/nvim/eval') diff --git a/src/nvim/eval/funcs.c b/src/nvim/eval/funcs.c index 56468190b5..8e49d1b9a8 100644 --- a/src/nvim/eval/funcs.c +++ b/src/nvim/eval/funcs.c @@ -7766,6 +7766,9 @@ static int search_cmn(typval_T *argvars, pos_T *match_pos, int *flagsp) break; } } + + // clear the start flag to avoid getting stuck here + options &= ~SEARCH_START; } if (subpatnum != FAIL) { -- cgit