From 1402c5bbfa277fdf4a8dbabd6614d948d8ab3e4f Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 3 Oct 2022 16:21:50 +0530 Subject: [PATCH] Forgot to change check for space for next tab to use its max tab length rather than the current tabs max tab length, since they can now be different --- kitty/tab_bar.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kitty/tab_bar.py b/kitty/tab_bar.py index cc99f0adc..1b3065f5a 100644 --- a/kitty/tab_bar.py +++ b/kitty/tab_bar.py @@ -589,7 +589,8 @@ class TabBar: end = self.draw_func(self.draw_data, s, t, before, max_tab_length, i + 1, t is last_tab, ed) s.cursor.bg = s.cursor.fg = 0 cell_ranges.append((before, end)) - if not ed.for_layout and s.cursor.x > s.columns - max_tab_length and t is not last_tab: + if not ed.for_layout and t is not last_tab and s.cursor.x > s.columns - max_tab_lengths[i+1]: + # Stop if there is no space for next tab s.cursor.x = s.columns - 2 s.cursor.bg = as_rgb(color_as_int(self.draw_data.default_bg)) s.cursor.fg = as_rgb(0xff0000)