diff options
| author | Johannes Altmanninger <aclopte@gmail.com> | 2022-01-03 22:43:04 +0100 |
|---|---|---|
| committer | Johannes Altmanninger <aclopte@gmail.com> | 2022-01-09 20:23:51 +0100 |
| commit | 6f7c5aed107c183565661336ae840998a73e783f (patch) | |
| tree | 54388122f7b129a4d5beded52bba1603ce0ec065 /src/insert_completer.hh | |
| parent | 871782faaf954cda654cdbdcb3590b45534607d1 (diff) | |
Do not show custom completions when autocomplete is off
As reported in [1], completions provided by "set global completers
option=my_completion" activate insert mode autocompletion, even when
the autocomplete option does not have the insert mode flag.
This happens because InsertCompleter::on_option_changed() calls
InsertCompleter::setup_ifn(), which shows the completion pager.
Fix this by computing whether the completion pager is enabled;
otherwise we can return early from setup_ifn().
The completion pager is enabled if the autocompletion bit is set,
or if the user has requested explicit completion.
[1]: https://github.com/kak-lsp/kak-lsp/issues/585
Diffstat (limited to 'src/insert_completer.hh')
| -rw-r--r-- | src/insert_completer.hh | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/insert_completer.hh b/src/insert_completer.hh index b3c7480d..1d68be86 100644 --- a/src/insert_completer.hh +++ b/src/insert_completer.hh @@ -107,6 +107,7 @@ private: InsertCompletion m_completions; Vector<BufferRange> m_inserted_ranges; int m_current_candidate = -1; + bool m_enabled = true; using CompleteFunc = InsertCompletion (const SelectionList& sels, const OptionManager& options, |
