diff options
author | zeertzjq <zeertzjq@outlook.com> | 2024-06-05 20:27:06 +0200 |
---|---|---|
committer | Christian Brabandt <cb@256bit.org> | 2024-06-05 20:27:06 +0200 |
commit | 529b9ad62a0e843ee56ef609aef7e51b7dc8a4c8 (patch) | |
tree | d7831186f577859f65e02e53f1300ea66ad65d00 /src/popupmenu.c | |
parent | 84d9611b673230a0e1e8fd57423976d30ef36308 (diff) |
patch 9.1.0469: Cannot have buffer-local value for 'completeopt'v9.1.0469
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: #5487
closes: #14922
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Diffstat (limited to 'src/popupmenu.c')
-rw-r--r-- | src/popupmenu.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/popupmenu.c b/src/popupmenu.c index 741980660f..01b6ab1e95 100644 --- a/src/popupmenu.c +++ b/src/popupmenu.c @@ -760,6 +760,7 @@ pum_set_selected(int n, int repeat UNUSED) int context = pum_height / 2; #ifdef FEAT_QUICKFIX int prev_selected = pum_selected; + unsigned cur_cot_flags = get_cot_flags(); #endif #if defined(FEAT_PROP_POPUP) && defined(FEAT_QUICKFIX) int has_info = FALSE; @@ -831,7 +832,7 @@ pum_set_selected(int n, int repeat UNUSED) 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; @@ -842,9 +843,9 @@ pum_set_selected(int n, int repeat UNUSED) # endif # ifdef FEAT_PROP_POPUP has_info = TRUE; - if (strstr((char *)p_cot, "popuphidden") != NULL) + if (cur_cot_flags & COT_POPUPHIDDEN) use_popup = USEPOPUP_HIDDEN; - else if (strstr((char *)p_cot, "popup") != NULL) + else if (cur_cot_flags & COT_POPUP) use_popup = USEPOPUP_NORMAL; else use_popup = USEPOPUP_NONE; |