From ca1d7ef863063993631dd77af7b0bdcf819273fc Mon Sep 17 00:00:00 2001 From: kerty Date: Sun, 30 Mar 2025 21:01:43 +0300 Subject: [PATCH] Fix residual lines after repaint with shrinking prompt If you use `set t 10; function fish_prompt; seq $t; set t $(math $t - 1); end` and trigger a repaint, you will see 9 residual lines from the previous prompt. --- src/screen.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/screen.rs b/src/screen.rs index 536cd1ca9..fb26d2c2d 100644 --- a/src/screen.rs +++ b/src/screen.rs @@ -549,6 +549,7 @@ pub fn reset_line(&mut self, repaint_prompt: bool /* = false */) { .map_or(1, |p| calc_prompt_lines(p)); self.actual.cursor.y += prompt_line_count.checked_sub(1).unwrap(); self.actual_left_prompt = None; + self.need_clear_screen = true; } self.actual.resize(0); self.need_clear_lines = true;