Address review comments: clarify reversed reset and vertical NULL params

This commit is contained in:
copilot-swe-agent[bot]
2026-07-03 04:05:40 +00:00
committed by GitHub
parent 6fb8ff1829
commit 0b27865625
2 changed files with 3 additions and 1 deletions

View File

@@ -3453,7 +3453,7 @@ get_line_edge_colors_at_row(Screen *self, index_type y, color_type *left, color_
if (left) *left = effective_cell_edge_color(left_char, left_cell_fg, left_cell_bg, true);
if (line->xnum > 0) cell_color_x = line->xnum - 1;
char_type right_char = line_get_char(line, cell_color_x);
reversed = false;
reversed = false; // reset: colors_for_cell only sets this flag, never clears it
colors_for_cell(line, self->color_profile, &cell_color_x, &right_cell_fg, &right_cell_bg, &reversed);
if (right_is_default) *right_is_default = (line->gpu_cells[cell_color_x].bg & 0xff) == 0;
if (right) *right = effective_cell_edge_color(right_char, right_cell_fg, right_cell_bg, false);

View File

@@ -1420,6 +1420,8 @@ PYWRAP1(update_tab_bar_edge_colors) {
} else {
color_type top_color = 0, bottom_color = 0;
bool top_is_default = true, bottom_is_default = true;
// For vertical bars we only need the left-edge color of each row (the
// right-edge output is unused since tabs span the full row width).
ok = get_line_edge_colors_at_row(screen, 0, &top_color, NULL, &top_is_default, NULL) &&
get_line_edge_colors_at_row(screen, screen->lines - 1, &bottom_color, NULL, &bottom_is_default, NULL);
if (ok) {