diff options
author | zeertzjq <zeertzjq@outlook.com> | 2024-06-06 05:50:44 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2024-06-06 06:07:31 +0800 |
commit | 1d4e894403638a94ac58766cdcbc7f3128db318b (patch) | |
tree | bfd2791623c56bb106f61286d3cb7a855e126355 /src/nvim/popupmenu.c | |
parent | c235a063d6ead447f13076be50ddd9fae6223913 (diff) | |
download | rneovim-1d4e894403638a94ac58766cdcbc7f3128db318b.tar.gz rneovim-1d4e894403638a94ac58766cdcbc7f3128db318b.tar.bz2 rneovim-1d4e894403638a94ac58766cdcbc7f3128db318b.zip |
vim-patch:9.1.0469: Cannot have buffer-local value for 'completeopt'
Problem: Cannot have buffer-local value for 'completeopt'
(Nick Jensen).
Solution: Make 'completeopt' global-local (zeertzjq).
Also for some reason test Test_ColonEight_MultiByte seems to be failing
sporadically now. Let's mark it as flaky.
fixes: vim/vim#5487
closes: vim/vim#14922
https://github.com/vim/vim/commit/529b9ad62a0e843ee56ef609aef7e51b7dc8a4c8
Diffstat (limited to 'src/nvim/popupmenu.c')
-rw-r--r-- | src/nvim/popupmenu.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/nvim/popupmenu.c b/src/nvim/popupmenu.c index bf2fe0f72c..324254a188 100644 --- a/src/nvim/popupmenu.c +++ b/src/nvim/popupmenu.c @@ -700,7 +700,7 @@ static void pum_preview_set_text(buf_T *buf, char *info, linenr_T *lnum, int *ma } // delete the empty last line ml_delete_buf(buf, buf->b_ml.ml_line_count, false); - if (strstr(p_cot, "popup") != NULL) { + if (get_cot_flags() & COT_POPUP) { extmark_splice(buf, 1, 0, 1, 0, 0, buf->b_ml.ml_line_count, 0, inserted_bytes, kExtmarkNoUndo); } } @@ -795,7 +795,8 @@ static bool pum_set_selected(int n, int repeat) int prev_selected = pum_selected; pum_selected = n; - bool use_float = strstr(p_cot, "popup") != NULL; + unsigned cur_cot_flags = get_cot_flags(); + bool use_float = (cur_cot_flags & COT_POPUP) != 0; // when new leader add and info window is shown and no selected we still // need use the first index item to update the info float window position. bool force_select = use_float && pum_selected < 0 && win_float_find_preview(); @@ -861,7 +862,7 @@ static bool pum_set_selected(int n, int repeat) if ((pum_array[pum_selected].pum_info != NULL) && (Rows > 10) && (repeat <= 1) - && (vim_strchr(p_cot, 'p') != NULL)) { + && (cur_cot_flags & COT_ANY_PREVIEW)) { win_T *curwin_save = curwin; tabpage_T *curtab_save = curtab; |