diff --git a/kitty/tab_bar.py b/kitty/tab_bar.py index 4ecd9633e..aaf96f598 100644 --- a/kitty/tab_bar.py +++ b/kitty/tab_bar.py @@ -687,7 +687,7 @@ def update_blank_rects(self, central: Region, tab_bar: Region, vw: int, vh: int) if opts.tab_bar_margin_height.outer: blank_rects.append(Border(0, tab_bar.bottom, vw, vh, bg)) if opts.tab_bar_margin_height.inner: - blank_rects.append(Border(0, central.bottom, vw, vh, bg)) + blank_rects.append(Border(0, central.bottom, vw, tab_bar.top, bg)) else: # top if opts.tab_bar_margin_height.outer: blank_rects.append(Border(0, 0, vw, tab_bar.top, bg)) @@ -695,13 +695,13 @@ def update_blank_rects(self, central: Region, tab_bar: Region, vw: int, vh: int) blank_rects.append(Border(0, tab_bar.bottom, vw, central.top, bg)) g = self.window_geometry left_bg = right_bg = bg - if opts.tab_bar_margin_color is None or opts.tab_bar_margin_width == 0: + if opts.tab_bar_margin_color is None and opts.tab_bar_margin_width > 0: left_bg = BorderColor.tab_bar_left_edge_color right_bg = BorderColor.tab_bar_right_edge_color if g.left > 0: blank_rects.append(Border(0, g.top, g.left, g.bottom, left_bg)) - if g.right - 1 < vw: - blank_rects.append(Border(g.right - 1, g.top, vw, g.bottom, right_bg)) + if g.right < vw: + blank_rects.append(Border(g.right, g.top, vw, g.bottom, right_bg)) self.blank_rects = tuple(blank_rects) def layout(self) -> None: