From 0af780e8df849f6d393873124afaa31681ab43ec Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sat, 22 Mar 2025 06:32:49 +0800 Subject: vim-patch:9.1.1228: completion: current position column wrong after got a match Problem: The current_pos.col was incorrectly updated to the length of the matching text. This will cause the next search to start from the wrong position. Solution: current_pos has already been updated in search_str_in_line and does not need to be changed (glepnir) closes: vim/vim#16941 https://github.com/vim/vim/commit/5753084042e17d794627d77e4300def031ce5498 Co-authored-by: glepnir --- src/nvim/search.c | 1 - 1 file changed, 1 deletion(-) (limited to 'src/nvim') diff --git a/src/nvim/search.c b/src/nvim/search.c index 6db5fc159b..b38296ac5c 100644 --- a/src/nvim/search.c +++ b/src/nvim/search.c @@ -3749,7 +3749,6 @@ bool search_for_fuzzy_match(buf_T *buf, pos_T *pos, char *pattern, int dir, pos_ } } *len = (int)(next_word_end - *ptr); - current_pos.col = *len; } } *pos = current_pos; -- cgit