diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-05-10 07:58:58 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-10 07:58:58 +0800 |
commit | 9aa5647e686e5420e5b9b51828ec7d55631f98ed (patch) | |
tree | 81172459aa5b8ac5c1f2e4e0b322e70267712ecd /src/nvim/popupmnu.c | |
parent | c55867b46d6758c4ff2e55d1bfb4cfc163182a12 (diff) | |
download | rneovim-9aa5647e686e5420e5b9b51828ec7d55631f98ed.tar.gz rneovim-9aa5647e686e5420e5b9b51828ec7d55631f98ed.tar.bz2 rneovim-9aa5647e686e5420e5b9b51828ec7d55631f98ed.zip |
vim-patch:8.2.4911: the mode #defines are not clearly named (#18499)
Problem: The mode #defines are not clearly named.
Solution: Prepend MODE_. Renumber them to put the mapped modes first.
https://github.com/vim/vim/commit/249591057b4840785c50e41dd850efb8a8faf435
A hunk from the patch depends on patch 8.2.4861, which hasn't been
ported yet, but that should be easy to notice.
Diffstat (limited to 'src/nvim/popupmnu.c')
-rw-r--r-- | src/nvim/popupmnu.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nvim/popupmnu.c b/src/nvim/popupmnu.c index 78b3ceaacf..4317a4e2ce 100644 --- a/src/nvim/popupmnu.c +++ b/src/nvim/popupmnu.c @@ -111,10 +111,10 @@ void pum_display(pumitem_T *array, int size, int selected, bool array_changed, i // To keep the code simple, we only allow changing the // draw mode when the popup menu is not being displayed pum_external = ui_has(kUIPopupmenu) - || (State == CMDLINE && ui_has(kUIWildmenu)); + || (State == MODE_CMDLINE && ui_has(kUIWildmenu)); } - pum_rl = (curwin->w_p_rl && State != CMDLINE); + pum_rl = (curwin->w_p_rl && State != MODE_CMDLINE); do { // Mark the pum as visible already here, @@ -126,7 +126,7 @@ void pum_display(pumitem_T *array, int size, int selected, bool array_changed, i below_row = cmdline_row; // wildoptions=pum - if (State == CMDLINE) { + if (State == MODE_CMDLINE) { pum_win_row = ui_has(kUICmdline) ? 0 : cmdline_row; cursor_col = cmd_startcol; pum_anchor_grid = ui_has(kUICmdline) ? -1 : DEFAULT_GRID_HANDLE; @@ -419,7 +419,7 @@ void pum_redraw(void) grid_assign_handle(&pum_grid); - pum_grid.zindex = ((State == CMDLINE) + pum_grid.zindex = ((State == MODE_CMDLINE) ? kZIndexCmdlinePopupMenu : kZIndexPopupMenu); bool moved = ui_comp_put_grid(&pum_grid, pum_row, pum_col - col_off, |