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.
This commit is contained in:
kerty
2025-03-30 21:01:43 +03:00
committed by Johannes Altmanninger
parent 7ed4dfbd2d
commit ca1d7ef863

View File

@@ -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;