Skip to content

Commit 53b14fd

Browse files
committed
fix(tabs): reserve the island band when closing down to two tabs
close_tab lisait ctx().len() *après* que close_current_context ait déjà retiré le contexte, puis re-soustrayait 1 — donc fermer de 3 à 2 onglets passait num_tabs=1 à resize_top_or_bottom_line. Sur Linux/Windows ça prend la branche hide_if_single et retire la bande ISLAND_HEIGHT de la marge top : la grille garde ~2 lignes de trop (débordent hors fenêtre). On passe le vrai compte restant, comme tous les autres appelants. Bug latent aussi upstream ; ne se réveille qu'une fois le recompute des lignes actif (ee589ea / raphamorim#1632). Inerte sur macOS (branche num_tabs compilée hors binaire).
1 parent 8a03a01 commit 53b14fd

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

  • frontends/rioterm/src/screen

frontends/rioterm/src/screen/mod.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1548,8 +1548,9 @@ impl Screen<'_> {
15481548
return;
15491549
}
15501550

1551-
let num_tabs = self.ctx().len().wrapping_sub(1);
1552-
self.resize_top_or_bottom_line(num_tabs);
1551+
// True remaining count — ctx().len() is already post-close here. A `- 1`
1552+
// dropped the island band at exactly 2 tabs (Linux/Windows) → 2 extra rows.
1553+
self.resize_top_or_bottom_line(self.ctx().len());
15531554
self.mark_dirty();
15541555
}
15551556

0 commit comments

Comments
 (0)