]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.1.1496: terminal: still not highlighting empty cells correctly v9.1.1496
authorChristian Brabandt <cb@256bit.org>
Sun, 29 Jun 2025 20:22:05 +0000 (22:22 +0200)
committerChristian Brabandt <cb@256bit.org>
Sun, 29 Jun 2025 20:22:05 +0000 (22:22 +0200)
Problem:  terminal: still not highlighting empty cells correctly
          (Yousef Mohammed, after v9.1.1489)
Solution: Use vcol instead of col

closes: #17632

Signed-off-by: Christian Brabandt <cb@256bit.org>
src/drawline.c
src/testdir/dumps/Test_terminal_empty_listchars2.dump [new file with mode: 0644]
src/testdir/test_terminal3.vim
src/version.c

index afc048091203bcf383d87d5b24595d2de88607c9..2388193b97820f4b6fff2dd56b480882204b24d7 100644 (file)
@@ -2774,7 +2774,7 @@ win_line(
                skip_cells = 0;
 #ifdef FEAT_TERMINAL
                if (term_show_buffer(wp->w_buffer)
-                   && wlv.col == 0
+                   && wlv.vcol == 0
                    && wlv.win_attr == term_get_attr(wp, lnum, -1))
                    // reset highlighting attribute
                    wlv.win_attr = 0;
diff --git a/src/testdir/dumps/Test_terminal_empty_listchars2.dump b/src/testdir/dumps/Test_terminal_empty_listchars2.dump
new file mode 100644 (file)
index 0000000..6df4d40
--- /dev/null
@@ -0,0 +1,15 @@
+| +0#af5f00255#ffffff0@1|1| |h+0#0000001#a8a8a8255|e|l@1|o| +0#0000000#ffffff0@65
+| +0#af5f00255&@1|2| | +0#0000001#a8a8a8255| +0#0000000#ffffff0@69
+| +0#af5f00255&@1|3| >h+0#0000000&|e+0#0000001#a8a8a8255|l@1|o| +0#0000000#ffffff0@65
+|~+0#4040ff13&| @73
+|~| @73
+|~| @73
+|!+2#ffffff16#00e0003|s|h| |-|c| |"|p|r|i|n|t|f| |'|h|e|l@1|o|\@1|n|\@1|n|h|e|l@1|o|'|"| |[|f|i|n|i|s|h|e|d|]| @11|3|,|1| @11|A|l@1
+| +0#0000000#ffffff0@74
+|~+0#4040ff13&| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|[+1#0000000&|N|o| |N|a|m|e|]| @47|0|,|0|-|1| @9|A|l@1
+|-+2&&@1| |V|I|S|U|A|L| |L|I|N|E| |-@1| +0&&@46|3| @9
index 9aa90492c8db7c21fb494cd4fd8ff4e92e201dc7..7a2ecdbc1b79a9c3a51f9da59c6c41526f002215 100644 (file)
@@ -1032,6 +1032,10 @@ func Test_terminal_visual_empty_listchars()
   call term_wait(buf)
   call term_sendkeys(buf, "V2k")
   call VerifyScreenDump(buf, 'Test_terminal_empty_listchars', {})
+  call term_sendkeys(buf, "\<esc>")
+  call term_sendkeys(buf, ":set nu\<cr>")
+  call term_sendkeys(buf, "ggV2j")
+  call VerifyScreenDump(buf, 'Test_terminal_empty_listchars2', {})
 
   call StopVimInTerminal(buf)
 endfunc
index 657d68ad2ab3291d2657f3d80e8a9920a9977e26..2cf34ea333f62ac9a83ba270deda39dced996919 100644 (file)
@@ -719,6 +719,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1496,
 /**/
     1495,
 /**/