mirror of
https://github.com/neovim/neovim.git
synced 2025-10-17 07:16:09 +00:00
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
5753084042
Co-authored-by: glepnir <glephunter@gmail.com>
This commit is contained in:
@@ -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);
|
*len = (int)(next_word_end - *ptr);
|
||||||
current_pos.col = *len;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
*pos = current_pos;
|
*pos = current_pos;
|
||||||
|
@@ -2996,6 +2996,10 @@ func Test_complete_fuzzy_collect()
|
|||||||
call feedkeys("Sh\<C-X>\<C-K>\<C-N>\<C-N>\<CR>\<Esc>0", 'tx!')
|
call feedkeys("Sh\<C-X>\<C-K>\<C-N>\<C-N>\<CR>\<Esc>0", 'tx!')
|
||||||
call assert_equal('think', getline(line('.') - 1))
|
call assert_equal('think', getline(line('.') - 1))
|
||||||
|
|
||||||
|
call setline(1, ['foo bar fuzzy', 'completefuzzycollect'])
|
||||||
|
call feedkeys("Gofuzzy\<C-X>\<C-N>\<C-N>\<C-N>\<C-Y>\<Esc>0", 'tx!')
|
||||||
|
call assert_equal('completefuzzycollect', getline('.'))
|
||||||
|
|
||||||
bw!
|
bw!
|
||||||
bw!
|
bw!
|
||||||
set dict&
|
set dict&
|
||||||
|
Reference in New Issue
Block a user