patch 9.1.1575: tabpanel not drawn correctly with wrapped lines

Commit: 
https://github.com/vim/vim/commit/e1c507a9657f6ce39213b1de3cdb1184fc9c71a0
Author: Hirohito Higashi <h.east....@gmail.com>
Date:   Mon Jul 21 20:32:08 2025 +0200

    patch 9.1.1575: tabpanel not drawn correctly with wrapped lines
    
    Problem:  tabpanel not drawn correctly with wrapped lines
              (utubo, after v9.1.1534)
    Solution: Use Columns as width, not the frame width
              (Hirohito Higashi)
    
    fixes: #17774
    closes: #17809
    
    Signed-off-by: Hirohito Higashi <h.east....@gmail.com>
    Signed-off-by: Christian Brabandt <c...@256bit.org>

diff --git a/src/screen.c b/src/screen.c
index 8f9a11014..3e3c86f37 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -366,9 +366,6 @@ char_needs_redraw(int off_from, int off_to, int cols)
                            && ScreenLines[off_from + 1]
                                                != ScreenLines[off_to + 1])))))
        return TRUE;
-    // TODO: This is a temporary solution until the root cause is fixed.
-    if (firstwin->w_wincol > 0)
-       return TRUE;
     return FALSE;
 }
 
@@ -3691,9 +3688,9 @@ screen_ins_lines(
            LineOffset[j + line_count] = temp;
            LineWraps[j + line_count] = FALSE;
            if (can_clear((char_u *)" "))
-               lineclear(temp, topframe->fr_width, clear_attr);
+               lineclear(temp, (int)Columns, clear_attr);
            else
-               lineinvalid(temp, topframe->fr_width);
+               lineinvalid(temp, (int)Columns);
        }
     }
 
diff --git a/src/testdir/dumps/Test_tabpanel_drawing_2_0.dump 
b/src/testdir/dumps/Test_tabpanel_drawing_2_0.dump
new file mode 100644
index 000000000..8dee217e3
--- /dev/null
+++ b/src/testdir/dumps/Test_tabpanel_drawing_2_0.dump
@@ -0,0 +1,10 @@
+| +0&#ffffff0@57||+1&&|++2&&| |[|N|o| |N|a|m|e|]| @7
+> +0&&@57||+1&&| @18
+|a+0&&@2| @54||+1&&| @18
+|~+0#4040ff13&| @56||+1#0000000&| @18
+|~+0#4040ff13&| @56||+1#0000000&| @18
+|~+0#4040ff13&| @56||+1#0000000&| @18
+|~+0#4040ff13&| @56||+1#0000000&| @18
+|~+0#4040ff13&| @56||+1#0000000&| @18
+|~+0#4040ff13&| @56||+1#0000000&| @18
+|-+2&&@1| |I|N|S|E|R|T| |-@1| +0&&@47|2|,|1| @10|A|l@1| 
diff --git a/src/testdir/dumps/Test_tabpanel_drawing_2_1.dump 
b/src/testdir/dumps/Test_tabpanel_drawing_2_1.dump
new file mode 100644
index 000000000..c3d257dc6
--- /dev/null
+++ b/src/testdir/dumps/Test_tabpanel_drawing_2_1.dump
@@ -0,0 +1,10 @@
+|++2&#ffffff0| |[|N|o| |N|a|m|e|]| @7||+1&&| +0&&@57
+| +1&&@18||> +0&&@57
+| +1&&@18|||a+0&&@2| @54
+| +1&&@18|||~+0#4040ff13&| @56
+| +1#0000000&@18|||~+0#4040ff13&| @56
+| +1#0000000&@18|||~+0#4040ff13&| @56
+| +1#0000000&@18|||~+0#4040ff13&| @56
+| +1#0000000&@18|||~+0#4040ff13&| @56
+| +1#0000000&@18|||~+0#4040ff13&| @56
+|-+2#0000000&@1| |I|N|S|E|R|T| |-@1| +0&&@47|2|,|1| @10|A|l@1| 
diff --git a/src/testdir/test_tabpanel.vim b/src/testdir/test_tabpanel.vim
index f2925504c..7abf2e9bb 100644
--- a/src/testdir/test_tabpanel.vim
+++ b/src/testdir/test_tabpanel.vim
@@ -204,6 +204,27 @@ function Test_tabpanel_drawing()
   call StopVimInTerminal(buf)
 endfunc
 
+function Test_tabpanel_drawing_2()
+  CheckScreendump
+
+  let lines =<< trim END
+    set showtabpanel=2
+    set tabpanelopt=align:right,vert
+    call setbufline(bufnr(), 1, ['', 'aaa'])
+  END
+  call writefile(lines, 'XTest_tabpanel_drawing_2', 'D')
+
+  let buf = RunVimInTerminal('-S XTest_tabpanel_drawing_2', {'rows': 10, 
'cols': 78})
+  call term_sendkeys(buf, "ggo")
+  call VerifyScreenDump(buf, 'Test_tabpanel_drawing_2_0', {})
+
+  call term_sendkeys(buf, "\<Esc>u:set tabpanelopt+=align:left\<CR>")
+  call term_sendkeys(buf, "ggo")
+  call VerifyScreenDump(buf, 'Test_tabpanel_drawing_2_1', {})
+
+  call StopVimInTerminal(buf)
+endfunc
+
 function Test_tabpanel_drawing_with_popupwin()
   CheckScreendump
 
diff --git a/src/version.c b/src/version.c
index f90728701..8e4cfcc2b 100644
--- a/src/version.c
+++ b/src/version.c
@@ -719,6 +719,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1575,
 /**/
     1574,
 /**/

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/vim_dev/E1udvVY-0025zN-9V%40256bit.org.

Raspunde prin e-mail lui