Fix superfluous tab bar margin when background_opacity < 1 (issue #10212)

This commit is contained in:
copilot-swe-agent[bot] 2026-07-03 02:42:28 +00:00 committed by GitHub
parent c1d507dbe8
commit 252d8b73f7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 4 deletions

View file

@ -198,6 +198,8 @@ Detailed list of changes
- Make erasing last command robust against commands with no output and commands in the scrollback (:pull:`10201`)
- Fix superfluous margin visible to the left and right of the tab bar when :opt:`background_opacity` is less than one and the window width is not a multiple of the cell width (:iss:`10212`)
0.47.4 [2026-06-15]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

View file

@ -23,7 +23,6 @@ from .fast_data_types import (
Color,
Region,
Screen,
background_opacity_of,
cell_size_for_window,
get_boss,
get_options,
@ -763,11 +762,11 @@ class TabBar:
if g.bottom < tab_bar.bottom:
blank_rects.append(Border(g.left, g.bottom, g.right, tab_bar.bottom, bg))
else:
left_bg = right_bg = bg
if opts.tab_bar_margin_color is None and (
opacity := background_opacity_of(self.os_window_id)) is not None and opacity >= 1:
if opts.tab_bar_margin_color is None:
left_bg = BorderColor.tab_bar_left_edge_color
right_bg = BorderColor.tab_bar_right_edge_color
else:
left_bg = right_bg = bg
if g.left > tab_bar.left:
blank_rects.append(Border(tab_bar.left, g.top, g.left, g.bottom, left_bg))
if g.right < tab_bar.right: