cleaned up debug code

This commit is contained in:
2026-06-03 17:13:20 +02:00
parent d2939de936
commit bc552f6f0f
2 changed files with 19 additions and 4 deletions
+19
View File
@@ -1938,6 +1938,25 @@ impl App {
let geometries = tab.collect_pane_geometries(); let geometries = tab.collect_pane_geometries();
let active_pane_id = tab.active_pane; let active_pane_id = tab.active_pane;
// Early return: skip rendering if nothing is dirty and no animations
let has_dirty_content = geometries.iter().any(|(pane_id, _)| {
tab.panes
.get(pane_id)
.map(|p| {
let dl = &p.terminal.dirty_lines;
dl[0] != 0 || dl[1] != 0 || dl[2] != 0 || dl[3] != 0
})
.unwrap_or(false)
});
if !has_dirty_content && self.edge_glows.is_empty() {
let image_animation_in_progress = tab.panes.values().any(|p| {
p.terminal.image_storage.has_animations()
});
needs_another_frame = image_animation_in_progress;
return needs_another_frame;
}
// First pass: sync images and calculate dim factors (needs mutable access) // First pass: sync images and calculate dim factors (needs mutable access)
let mut dim_factors: Vec<(PaneId, f32)> = Vec::new(); let mut dim_factors: Vec<(PaneId, f32)> = Vec::new();
for (pane_id, _) in &geometries { for (pane_id, _) in &geometries {
-4
View File
@@ -2150,10 +2150,6 @@ impl Renderer {
let rows = terminal.rows; let rows = terminal.rows;
let total_cells = cols * rows; let total_cells = cols * rows;
// TEMPORARY DEBUG: Force full rebuild every frame to test if dirty-line tracking is the issue
// TODO: Remove this once the rendering bug is fixed
self.cells_dirty = true;
// Check if grid size changed - need full rebuild // Check if grid size changed - need full rebuild
let size_changed = self.last_grid_size != (cols, rows); let size_changed = self.last_grid_size != (cols, rows);
if size_changed { if size_changed {