mirror of
https://github.com/neovim/neovim.git
synced 2025-10-16 14:56:08 +00:00
vim-patch:9.1.0605: internal error with fuzzy completion
Problem: internal error with fuzzy completion
(techntools)
Solution: only fuzzy complete the pattern after directory separator
(glepnir)
fixes: vim/vim#15287
closes: vim/vim#15291
0be03e14b9
Co-authored-by: glepnir <glephunter@gmail.com>
This commit is contained in:
@@ -3689,15 +3689,15 @@ bool search_for_fuzzy_match(buf_T *buf, pos_T *pos, char *pattern, int dir, pos_
|
||||
current_pos.lnum += dir;
|
||||
}
|
||||
|
||||
while (true) {
|
||||
if (buf == curbuf) {
|
||||
circly_end = *start_pos;
|
||||
} else {
|
||||
circly_end.lnum = buf->b_ml.ml_line_count;
|
||||
circly_end.col = 0;
|
||||
circly_end.coladd = 0;
|
||||
}
|
||||
if (buf == curbuf) {
|
||||
circly_end = *start_pos;
|
||||
} else {
|
||||
circly_end.lnum = buf->b_ml.ml_line_count;
|
||||
circly_end.col = 0;
|
||||
circly_end.coladd = 0;
|
||||
}
|
||||
|
||||
while (true) {
|
||||
// Check if looped around and back to start position
|
||||
if (looped_around && equalpos(current_pos, circly_end)) {
|
||||
break;
|
||||
@@ -3717,6 +3717,8 @@ bool search_for_fuzzy_match(buf_T *buf, pos_T *pos, char *pattern, int dir, pos_
|
||||
if (found_new_match) {
|
||||
*pos = current_pos;
|
||||
break;
|
||||
} else if (looped_around && current_pos.lnum == circly_end.lnum) {
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
if (fuzzy_match_str(*ptr, pattern) > 0) {
|
||||
|
Reference in New Issue
Block a user