mirror of
https://github.com/vim/vim
synced 2025-07-16 09:12:00 +00:00
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>
This commit is contained in:
committed by
Christian Brabandt
parent
d181bafd0b
commit
bc10be7a40
@ -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
|
||||
|
20
src/testdir/dumps/Test_pum_highlights_17.dump
Normal file
20
src/testdir/dumps/Test_pum_highlights_17.dump
Normal file
@ -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
|
@ -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, "\<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
|
||||
|
@ -704,6 +704,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
830,
|
||||
/**/
|
||||
829,
|
||||
/**/
|
||||
|
Reference in New Issue
Block a user