mirror of
https://github.com/vim/vim.git
synced 2025-11-15 23:14:06 -05:00
patch 9.1.1779: completion: 'autocomplete' cannot be enabled per buffer
Problem: completion: 'autocomplete' cannot be enabled per buffer
(Tomasz N)
Solution: Make 'autocomplete' global or local to buffer (Girish Palya)
fixes: #18320
closes: #18333
Signed-off-by: Girish Palya <girishji@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
2f3b7ea19a
commit
0208b3e80a
@@ -694,7 +694,7 @@ edit(
|
||||
{
|
||||
ins_compl_delete();
|
||||
if (ins_compl_has_preinsert()
|
||||
&& ins_compl_has_autocomplete())
|
||||
&& ins_compl_autocomplete_enabled())
|
||||
(void)ins_compl_insert(FALSE, TRUE);
|
||||
else
|
||||
(void)ins_compl_insert(FALSE, FALSE);
|
||||
@@ -987,7 +987,7 @@ doESCkey:
|
||||
case Ctrl_H:
|
||||
did_backspace = ins_bs(c, BACKSPACE_CHAR, &inserted_space);
|
||||
auto_format(FALSE, TRUE);
|
||||
if (did_backspace && p_ac && !char_avail()
|
||||
if (did_backspace && ins_compl_has_autocomplete() && !char_avail()
|
||||
&& curwin->w_cursor.col > 0)
|
||||
{
|
||||
c = char_before_cursor();
|
||||
@@ -1418,7 +1418,8 @@ normalchar:
|
||||
foldOpenCursor();
|
||||
#endif
|
||||
// Trigger autocompletion
|
||||
if (p_ac && !char_avail() && vim_isprintc(c))
|
||||
if (ins_compl_has_autocomplete() && !char_avail()
|
||||
&& vim_isprintc(c))
|
||||
{
|
||||
update_screen(UPD_VALID); // Show character immediately
|
||||
out_flush();
|
||||
|
||||
Reference in New Issue
Block a user