In `keymap.autoindent`, `!^F` is added to `indentkeys`, then `<C-f>` is
fed. In the end `indentkeys` is reset to its original value.
We need to escape any `|` in `indentkeys` when setting the option
because otherwise they are seen as the command separator.
Before this change:
1. `misc.merge({a = misc.none}, {a = nil})` returned `{a = misc.none}`
2. `misc.merge({a = nil}, {a = misc.none})` returned `{a = misc.none}`
(1) can cause error if a non-existing mapping is set to `config.disable`
(which is an alias for `misc.none`).
(2) does not cause any issue to date, but is inconsistent with the
expected behavior of `misc.merge(…)`.
After this change:
1. `misc.merge({a = misc.none}, {a = nil})` returns `{a = nil}`
2. `misc.merge({a = nil}, {a = misc.none})` returns `{a = nil}`
Fixes#440.
From NeoVim's `completeopt` documentation:
> noselect Do not select a match in the menu, force the user to
> select one from the menu. Only works in combination with
> "menu" or "menuone".
When `completeopt = "menu,menuone,noselect"` is used, custom completion
menu does not respect `noselect` and preselects the first item. No
preselection happens in case of native menu.
This patch addresses the bug and ensures that in case of custom menu no
items are preselected if `noselect` is specified in `completeopt`.
Fixes#332
* Expose get_selected_entry() from view module to main cmp module fixes#385
* add get_active_entry() also
* fix linting
* remove unused vars
Co-authored-by: alex.tylor <atylor@gmail.com>