Merge remote-tracking branch 'Delapouite/auto_complete'

This commit is contained in:
Maxime Coste 2018-08-30 20:07:08 +10:00
commit 872ecd472c
2 changed files with 10 additions and 6 deletions

View File

@ -49,7 +49,7 @@ The `completers` option controls automatic completion, which kicks in when
the value specified in the `idle_timeout` option is reached.
*<c-o>*::
disable automatic completion for this insert session
toggle automatic completion
*<c-n>*::
select next completion candidate
@ -734,7 +734,7 @@ The following keys are recognized by this mode to help with editing (See <<comma
insert next keystroke without interpreting it
*<c-o>*::
disable auto completion for this prompt
toggle automatic completion
*<a-!>*::
expand the typed expansions in currently entered text

View File

@ -887,10 +887,14 @@ public:
}
else if (key == ctrl('o'))
{
m_auto_complete = false;
clear_completions();
if (context().has_client())
m_auto_complete = not m_auto_complete;
if (m_auto_complete)
refresh_completions(CompletionFlags::Fast);
else if (context().has_client())
{
clear_completions();
context().client().menu_hide();
}
}
else if (key == alt('!'))
{
@ -1280,7 +1284,7 @@ public:
}
else if (key == ctrl('o'))
{
m_auto_complete = false;
m_auto_complete = not m_auto_complete;
m_completer.reset();
}
else if (key == ctrl('u'))