patch 9.1.0830: using wrong highlight group for spaces for popupmenu
Problem: using wrong highlight group for spaces for popupmenu
Solution: use original attribute instead of combined attributed
(glepnir)
closes: #15978
Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/src/popupmenu.c b/src/popupmenu.c
index 4d77c66..be8016f 100644
--- a/src/popupmenu.c
+++ b/src/popupmenu.c
@@ -839,11 +839,11 @@
#ifdef FEAT_RIGHTLEFT
if (pum_rl)
screen_fill(row, row + 1, pum_col - pum_width + 1, col + 1, ' ',
- ' ', attr);
+ ' ', orig_attr);
else
#endif
screen_fill(row, row + 1, col, pum_col + pum_width, ' ', ' ',
- attr);
+ orig_attr);
if (pum_scrollbar > 0)
{
#ifdef FEAT_RIGHTLEFT
diff --git a/src/testdir/dumps/Test_pum_highlights_17.dump b/src/testdir/dumps/Test_pum_highlights_17.dump
new file mode 100644
index 0000000..2439c4c
--- /dev/null
+++ b/src/testdir/dumps/Test_pum_highlights_17.dump
@@ -0,0 +1,20 @@
+|a+0&#ffffff0|w|o|r|d|1> @68
+|a+0#ff404010#e0e0e08|w|o|r|d|1| +0#0000001&@8| +0#4040ff13#ffffff0@59
+|你*0#ff404010#ffd7ff255|好| +0#0000001&@10| +0#4040ff13#ffffff0@59
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|-+2#0000000&@1| |U|s|e|r| |d|e|f|i|n|e|d| |c|o|m|p|l|e|t|i|o|n| |(|^|U|^|N|^|P|)| |m+0#00e0003&|a|t|c|h| |1| |o|f| |2| +0#0000000&@26
diff --git a/src/testdir/test_popup.vim b/src/testdir/test_popup.vim
index 3c748a4..6b807c8 100644
--- a/src/testdir/test_popup.vim
+++ b/src/testdir/test_popup.vim
@@ -1507,10 +1507,18 @@
func Test_pum_user_abbr_hlgroup()
CheckScreendump
let lines =<< trim END
- func CompleteFunc( findstart, base )
+ let s:var = 0
+ func CompleteFunc(findstart, base)
if a:findstart
return 0
endif
+ if s:var == 1
+ return {
+ \ 'words': [
+ \ { 'word': 'aword1', 'abbr_hlgroup': 'StrikeFake' },
+ \ { 'word': '你好', 'abbr_hlgroup': 'StrikeFake' },
+ \]}
+ endif
return {
\ 'words': [
\ { 'word': 'aword1', 'menu': 'extra text 1', 'kind': 'W', 'abbr_hlgroup': 'StrikeFake' },
@@ -1518,6 +1526,9 @@
\ { 'word': '你好', 'menu': 'extra text 3', 'kind': 'W', 'abbr_hlgroup': 'StrikeFake' },
\]}
endfunc
+ func ChangeVar()
+ let s:var = 1
+ endfunc
set completeopt=menu
set completefunc=CompleteFunc
@@ -1545,13 +1556,20 @@
call VerifyScreenDump(buf, 'Test_pum_highlights_14', {})
call term_sendkeys(buf, "\<C-E>\<Esc>")
+ call TermWait(buf)
+ call term_sendkeys(buf, ":call ChangeVar()\<CR>")
+ call TermWait(buf)
+ call term_sendkeys(buf, "S\<C-X>\<C-U>")
+ call VerifyScreenDump(buf, 'Test_pum_highlights_17', {})
+ call term_sendkeys(buf, "\<C-E>\<Esc>")
+
call StopVimInTerminal(buf)
endfunc
func Test_pum_user_kind_hlgroup()
CheckScreendump
let lines =<< trim END
- func CompleteFunc( findstart, base )
+ func CompleteFunc(findstart, base)
if a:findstart
return 0
endif
diff --git a/src/version.c b/src/version.c
index 27d5bc6..74660c6 100644
--- a/src/version.c
+++ b/src/version.c
@@ -705,6 +705,8 @@
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 830,
+/**/
829,
/**/
828,