mirror of
https://github.com/neovim/neovim.git
synced 2025-09-16 08:18:17 +00:00
vim-patch:8.0.0347
Problem: When using CTRL-X CTRL-U inside a comment, the use of the comment
leader may not work. (Klement)
Solution: Save and restore did_ai. (Christian Brabandt, closes vim/vim#1494)
d099e03370
This commit is contained in:
@@ -4344,6 +4344,7 @@ static int ins_complete(int c, bool enable_pum)
|
||||
int save_w_wrow;
|
||||
int save_w_leftcol;
|
||||
int insert_match;
|
||||
int save_did_ai = did_ai;
|
||||
|
||||
compl_direction = ins_compl_key2dir(c);
|
||||
insert_match = ins_compl_use_match(c);
|
||||
@@ -4559,6 +4560,8 @@ static int ins_complete(int c, bool enable_pum)
|
||||
if (*funcname == NUL) {
|
||||
EMSG2(_(e_notset), ctrl_x_mode == CTRL_X_FUNCTION
|
||||
? "completefunc" : "omnifunc");
|
||||
// restore did_ai, so that adding comment leader works
|
||||
did_ai = save_did_ai;
|
||||
return FAIL;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user