1
1
mirror of https://github.com/mawww/kakoune.git synced 2024-12-18 17:02:06 +03:00
kakoune/test/regression/0-autocomplete-overrules-completers/rc
Johannes Altmanninger 6f7c5aed10 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
2022-01-09 20:23:51 +01:00

7 lines
361 B
Plaintext

set-option global autocomplete prompt
declare-option -hidden completions line1_completions
declare-option -hidden completions line2_completions
set-option global completers option=line1_completions option=line2_completions
set-option global line1_completions "1.1+0@%val(timestamp)" "a1||a1"
set-option global line2_completions "2.1+0@%val(timestamp)" "a2||a2"