]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.1.1465: tabpanel: not correctly drawn with 'equalalways' v9.1.1465
authorHirohito Higashi <h.east.727@gmail.com>
Mon, 16 Jun 2025 18:26:08 +0000 (20:26 +0200)
committerChristian Brabandt <cb@256bit.org>
Mon, 16 Jun 2025 18:26:08 +0000 (20:26 +0200)
Problem:  tabpanel: not correctly drawn with 'equalalways'
Solution: call win_equal() (Hirohito Higashi)

closes: #17554

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/testdir/dumps/Test_tabpanel_only_1.dump
src/testdir/dumps/Test_tabpanel_stpl_eq_0_2.dump [new file with mode: 0644]
src/testdir/dumps/Test_tabpanel_stpl_eq_0_3.dump [new file with mode: 0644]
src/testdir/test_tabpanel.vim
src/version.c
src/window.c

index 19e85b8d1396c7158eb9bc7ac527be3fffeaef1b..8cbd93b6c1b078707f6bd60d12c842b253d3ced7 100644 (file)
@@ -1,10 +1,10 @@
-|a+0&#ffffff0|s|d|f| @24||+1&&|a+0&&|s|d|f| @43
-|a|s|d|f| @24||+1&&|a+0&&|s|d|f| @43
-|a|s|d|f| @24||+1&&|a+0&&|s|d|f| @43
-|a|s|d|f| @24||+1&&|a+0&&|s|d|f| @43
-|a|s|d|f| @24||+1&&|a+0&&|s|d|f| @43
-|a|s|d|f| @24||+1&&|a+0&&|s|d|f| @43
-|a|s|d|f| @24||+1&&|a+0&&|s|d|f| @43
-|a|s|d>f| @24||+1&&|a+0&&|s|d|f| @43
-|[+3&&|N|o| |N|a|m|e|]| |[|+|]| @1|1|0|1|,|4| @5|B|o|t| |[+1&&|N|o| |N|a|m|e|]| |[|+|]| @16|1|0|1|,|4| @9|B|o|t
+|a+0&#ffffff0|s|d|f| @34||+1&&|a+0&&|s|d|f| @33
+|a|s|d|f| @34||+1&&|a+0&&|s|d|f| @33
+|a|s|d|f| @34||+1&&|a+0&&|s|d|f| @33
+|a|s|d|f| @34||+1&&|a+0&&|s|d|f| @33
+|a|s|d|f| @34||+1&&|a+0&&|s|d|f| @33
+|a|s|d|f| @34||+1&&|a+0&&|s|d|f| @33
+|a|s|d|f| @34||+1&&|a+0&&|s|d|f| @33
+|a|s|d>f| @34||+1&&|a+0&&|s|d|f| @33
+|[+3&&|N|o| |N|a|m|e|]| |[|+|]| @7|1|0|1|,|4| @9|B|o|t| |[+1&&|N|o| |N|a|m|e|]| |[|+|]| @6|1|0|1|,|4| @9|B|o|t
 |:+0&&|t|a|b|o|n|l|y| @69
diff --git a/src/testdir/dumps/Test_tabpanel_stpl_eq_0_2.dump b/src/testdir/dumps/Test_tabpanel_stpl_eq_0_2.dump
new file mode 100644 (file)
index 0000000..4fe5c93
--- /dev/null
@@ -0,0 +1,10 @@
+|3+2#e000e06#ffffff0|++2#0000000&| |b@2| @14|3+2#e000e06&|++2#0000000&| |b@2| | +8#0000001#e0e0e08|0@3| | +1#0000000#ffffff0@42|X+8#0000001#e0e0e08
+|0@3| @15> +0#0000000#ffffff0@19||+1&&| +0&&@17||+1&&|a+0&&@2| @14
+| +1&&@19|~+0#4040ff13&| @18||+1#0000000&|~+0#4040ff13&| @16||+1#0000000&|b+0&&@2| @14
+| +1&&@19|~+0#4040ff13&| @18||+1#0000000&|~+0#4040ff13&| @16||+1#0000000&|c+0&&@2| @14
+| +1&&@19|~+0#4040ff13&| @18||+1#0000000&|~+0#4040ff13&| @16||+1#0000000&|d+0&&@2| @14
+| +1&&@19|~+0#4040ff13&| @18||+1#0000000&|~+0#4040ff13&| @16||+1#0000000&|~+0#4040ff13&| @16
+| +1#0000000&@19|~+0#4040ff13&| @18||+1#0000000&|~+0#4040ff13&| @16||+1#0000000&|~+0#4040ff13&| @16
+| +1#0000000&@19|~+0#4040ff13&| @18||+1#0000000&|~+0#4040ff13&| @16||+1#0000000&|~+0#4040ff13&| @16
+| +1#0000000&@19|b+3&&@2| @17|a+1&&@2| @15|[|N|o| |N|a|m|e|]| |[|+|]| @4
+| +0&&@77
diff --git a/src/testdir/dumps/Test_tabpanel_stpl_eq_0_3.dump b/src/testdir/dumps/Test_tabpanel_stpl_eq_0_3.dump
new file mode 100644 (file)
index 0000000..e6b47ed
--- /dev/null
@@ -0,0 +1,10 @@
+| +2&#ffffff0|3+2#e000e06&|++2#0000000&| |b@2| | +8#0000001#e0e0e08|0@3| | +1#0000000#ffffff0@62|X+8#0000001#e0e0e08
+> +0#0000000#ffffff0@25||+1&&| +0&&@24||+1&&|a+0&&@2| @21
+|~+0#4040ff13&| @24||+1#0000000&|~+0#4040ff13&| @23||+1#0000000&|b+0&&@2| @21
+|~+0#4040ff13&| @24||+1#0000000&|~+0#4040ff13&| @23||+1#0000000&|c+0&&@2| @21
+|~+0#4040ff13&| @24||+1#0000000&|~+0#4040ff13&| @23||+1#0000000&|d+0&&@2| @21
+|~+0#4040ff13&| @24||+1#0000000&|~+0#4040ff13&| @23||+1#0000000&|~+0#4040ff13&| @23
+|~| @24||+1#0000000&|~+0#4040ff13&| @23||+1#0000000&|~+0#4040ff13&| @23
+|~| @24||+1#0000000&|~+0#4040ff13&| @23||+1#0000000&|~+0#4040ff13&| @23
+|b+3#0000000&@2| @23|a+1&&@2| @22|[|N|o| |N|a|m|e|]| |[|+|]| @11
+| +0&&@77
index 1790feef3ef17d2d24b66d49a218894d03823a31..4d2fca140dc1f30259fc53160f5d9202edd0c7f1 100644 (file)
@@ -26,6 +26,14 @@ function Test_tabpanel_showtabpanel_eq_0()
   call VerifyScreenDump(buf, 'Test_tabpanel_stpl_eq_0_0', {})
   call term_sendkeys(buf, ":tabnext\<CR>\<C-L>")
   call VerifyScreenDump(buf, 'Test_tabpanel_stpl_eq_0_1', {})
+  call term_sendkeys(buf, ":set showtabpanel=2\<CR>")
+  call term_sendkeys(buf, ":vsp aaa\<CR>:vsp bbb\<CR>\<C-L>")
+  call VerifyScreenDump(buf, 'Test_tabpanel_stpl_eq_0_2', {})
+  call term_sendkeys(buf, ":set showtabpanel=0\<CR>\<C-L>")
+  call VerifyScreenDump(buf, 'Test_tabpanel_stpl_eq_0_3', {})
+  call term_sendkeys(buf, ":wincmd |\<CR>")
+  call term_sendkeys(buf, ":set showtabpanel=2\<CR>\<C-L>")
+  call VerifyScreenDump(buf, 'Test_tabpanel_stpl_eq_0_2', {})
   call StopVimInTerminal(buf)
 endfunc
 
index 65199ad6d4cc9113e3230c91f76a41d1b38274c1..fc2abd85e6f5df6bf5267fd3f3aeaac0dd58346a 100644 (file)
@@ -709,6 +709,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1465,
 /**/
     1464,
 /**/
index e05d46926b8af0772e33f6c0a9862d5cec3fa33f..3d2528fa6de7902cd47eb50583582d7d62e5d740 100644 (file)
@@ -6204,6 +6204,8 @@ shell_new_columns(void)
     if (firstwin == NULL)      // not initialized yet
        return;
 
+    int save_wincol = firstwin->w_wincol;
+    int save_fr_width = topframe->fr_width;
     int w = COLUMNS_WITHOUT_TPL();
 
     // First try setting the widths of windows with 'winfixwidth'.  If that
@@ -6214,6 +6216,9 @@ shell_new_columns(void)
 
     win_comp_pos();            // recompute w_winrow and w_wincol
 
+    if (p_ea && (firstwin->w_wincol != save_wincol
+               || topframe->fr_width != save_fr_width))
+       win_equal(curwin, FALSE, 0);
     if (!skip_win_fix_scroll)
        win_fix_scroll(TRUE);