Commit b61431c
fix: register cmdline mappings synchronously on CmdlineEnter
Split the combined CmdlineEnter/InsertEnter subscription so that
CmdlineEnter runs the handler directly instead of through
async.debounce_next_tick. Deferring to the next tick can land after
mode detection has shifted, leaving cmp.core:prepare() unable to
register cmdline mappings while is_cmdline_mode() still returns true.
Partial port of upstream PR hrsh7th#2214 (hrsh7th#2214).
The PR's other change (reordering config merges in lua/cmp/config.lua) was
intentionally NOT applied: misc.merge resolves leaf collisions in favor of
its first argument, so the original order is what makes onetime / cmdline /
filetype / buffer override global. Adopting the PR's reordering would
invert the documented priority.
Co-authored-by: Arvid Petermann <arvidpetermann@googlemail.com>1 parent 9ed2af6 commit b61431c
2 files changed
Lines changed: 11 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
3 | 9 | | |
4 | 10 | | |
5 | 11 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
16 | 20 | | |
17 | 21 | | |
18 | 22 | | |
| |||
0 commit comments