changeset 36442:fcff29a061b8 draft v9.1.0830

patch 9.1.0830: using wrong highlight group for spaces for popupmenu Commit: https://github.com/vim/vim/commit/bc10be7a4060748ed1876ab91cf53a2a8701ac13 Author: glepnir <glephunter@gmail.com> Date: Sat Nov 2 16:45:01 2024 +0100 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>
author Christian Brabandt <cb@256bit.org>
date Sat, 02 Nov 2024 17:00:03 +0100
parents 2b910fcab8fc
children 26278cb590fe
files src/popupmenu.c src/testdir/dumps/Test_pum_highlights_17.dump src/testdir/test_popup.vim src/version.c
diffstat 4 files changed, 44 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- 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
new file mode 100644
--- /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
--- 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, "\<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
--- a/src/version.c
+++ b/src/version.c
@@ -705,6 +705,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    830,
+/**/
     829,
 /**/
     828,