fix(tui): keep popups above terminal images

This commit is contained in:
objz committed 2026-07-28 14:12:38 +02:00
1 parent 6e898b8c45
commit 992f15b082
4 files changed
+59 -23

No files matched your search

+1 -16
View File
@@ -105,9 +105,6 @@ impl App {
let input_changed = self.handle_events().wrap_err("handle events failed")?;
let overlay_count = self.overlay_count();
let overlay_closed = overlay_count < drawn_overlay_count;
let overlay_repainted =
(input_changed || redraw_requested || overlay_count != drawn_overlay_count)
&& (overlay_count > 0 || drawn_overlay_count > 0);
let continuously_animated = spinner_active || error_buffer::has_errors();
let safety_refresh = last_draw.elapsed() >= Duration::from_secs(1);
if input_changed
@@ -120,11 +117,7 @@ impl App {
terminal.draw(|frame| {
self.render_frame(frame);
image_skips = terminal_image_skips(frame.buffer_mut());
if terminal_images_need_redraw(
&drawn_image_skips,
&image_skips,
overlay_repainted,
) {
if terminal_image_cells_changed(&drawn_image_skips, &image_skips) {
image_redraw_marker = !image_redraw_marker;
}
mark_terminal_images(frame.buffer_mut(), image_redraw_marker);
@@ -657,14 +650,6 @@ fn terminal_image_cells_changed(previous: &[bool], current: &[bool]) -> bool {
!previous.is_empty() && previous != current
}
fn terminal_images_need_redraw(
previous: &[bool],
current: &[bool],
overlay_repainted: bool,
) -> bool {
overlay_repainted || terminal_image_cells_changed(previous, current)
}
fn editor_runs_in_terminal(editor: &str) -> bool {
let editor_name = std::path::Path::new(editor)
.file_stem()