diff --git a/term/src/screen.rs b/term/src/screen.rs index 4fd5ee5ac..d75a5697a 100644 --- a/term/src/screen.rs +++ b/term/src/screen.rs @@ -645,6 +645,12 @@ impl Screen { } }; + if scroll_region.start == 0 { + for y in self.phys_range(&(0..num_rows as VisibleRowIndex)) { + self.line_mut(y).compress_for_scrollback(); + } + } + let remove_idx = if scroll_region.start == 0 { 0 } else {