0
0
mirror of https://github.com/vim/vim.git synced 2025-11-10 10:47:23 -05:00

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: #5487
closes: #14922

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
zeertzjq
2024-06-05 20:27:06 +02:00
committed by Christian Brabandt
parent 84d9611b67
commit 529b9ad62a
14 changed files with 146 additions and 41 deletions

View File

@@ -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;