mirror of
https://github.com/neovim/neovim.git
synced 2025-10-01 23:48:32 +00:00
fix(completion): avoid deleting text when completion leader changes #31448
Problem: When completion leader changes, text that might be reinserted immediately after is deleted. This unnecessarily affects extmarks. #31387 restored the original extmarks but that prevents end_right_gravity marks from growing. Solution: Avoid deleting leader text that will be reinserted.
This commit is contained in:
@@ -604,7 +604,7 @@ static int insert_execute(VimState *state, int key)
|
||||
|| (ins_compl_enter_selects()
|
||||
&& (s->c == CAR || s->c == K_KENTER || s->c == NL)))
|
||||
&& stop_arrow() == OK) {
|
||||
ins_compl_delete();
|
||||
ins_compl_delete(false);
|
||||
ins_compl_insert(false);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user