diff src/evalfunc.c @ 29267:f27ec19f2034 v8.2.5152

patch 8.2.5152: search() gets stuck with "c" and skip evaluates to true Commit: https://github.com/vim/vim/commit/180246cfd1a5842c538fa8a4a0b520f1d95c90c7 Author: zeertzjq <zeertzjq@outlook.com> Date: Thu Jun 23 12:04:46 2022 +0100 patch 8.2.5152: search() gets stuck with "c" and skip evaluates to true Problem: search() gets stuck with "c" and skip evaluates to true. Solution: Reset the SEARCH_START option. (closes https://github.com/vim/vim/issues/10608)
author Bram Moolenaar <Bram@vim.org>
date Thu, 23 Jun 2022 13:15:04 +0200
parents d1e263ecf634
children fb375f0c6ea7
line wrap: on
line diff
--- a/src/evalfunc.c
+++ b/src/evalfunc.c
@@ -8543,6 +8543,9 @@ search_cmn(typval_T *argvars, pos_T *mat
 	    if (!do_skip)
 		break;
 	}
+
+	// clear the start flag to avoid getting stuck here
+	options &= ~SEARCH_START;
     }
 
     if (subpatnum != FAIL)