mirror of
https://github.com/neovim/neovim.git
synced 2025-10-05 17:36:29 +00:00
vim-patch:9.0.2039: completion shows current word after completion restart (#25682)
Problem: completion shows current word after completion restart
Solution: remove the word being completed after completion restart
The word being completed is shown in a completion list after completion
restart, because it isn't removed from the current buffer before
searching for matches.
Also adjust `Test_complete_add_onechar` to match the new behavior.
closes: vim/vim#13349
2e3cd52fa0
Co-authored-by: nwounkn <nwounkn@gmail.com>
This commit is contained in:
@@ -3635,7 +3635,7 @@ static int ins_compl_next(bool allow_get_expansion, int count, bool insert_match
|
||||
}
|
||||
|
||||
if (allow_get_expansion && insert_match
|
||||
&& (!(compl_get_longest || compl_restarting) || compl_used_match)) {
|
||||
&& (!compl_get_longest || compl_used_match)) {
|
||||
// Delete old text to be replaced
|
||||
ins_compl_delete();
|
||||
}
|
||||
|
Reference in New Issue
Block a user