diff --git a/src/popupmenu.c b/src/popupmenu.c index 4d77c666a5..be8016f627 100644 --- a/src/popupmenu.c +++ b/src/popupmenu.c @@ -839,11 +839,11 @@ pum_redraw(void) #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 0000000000..2439c4c10c --- /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 3c748a4a52..6b807c8c3e 100644 --- a/src/testdir/test_popup.vim +++ b/src/testdir/test_popup.vim @@ -1507,10 +1507,18 @@ endfunc 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 @@ func Test_pum_user_abbr_hlgroup() \ { '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 @@ func Test_pum_user_abbr_hlgroup() call VerifyScreenDump(buf, 'Test_pum_highlights_14', {}) call term_sendkeys(buf, "\\") + call TermWait(buf) + call term_sendkeys(buf, ":call ChangeVar()\") + call TermWait(buf) + call term_sendkeys(buf, "S\\") + call VerifyScreenDump(buf, 'Test_pum_highlights_17', {}) + call term_sendkeys(buf, "\\") + 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 27d5bc6dde..74660c6876 100644 --- a/src/version.c +++ b/src/version.c @@ -704,6 +704,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 830, /**/ 829, /**/