diff --git a/docs/changelog.md b/docs/changelog.md index 33e87e681..044839852 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -107,6 +107,8 @@ As features stabilize some brief notes about them will accumulate here. for the local system via `getaddrinfo`. #5543 * DECSLRM incorrectly clamped the left margin based on the terminal height instead of the terminal width. Thanks to @j4james and @tmccombs! #5871 #5750 +* Scrollback position was incorrectly advanced when in alt-screen mode. + Thanks to @tbung! #6099 #4607 #### Updated * Bundled conpty.dll and OpenConsole.exe to build 1.19.240130002.nupkg diff --git a/term/src/screen.rs b/term/src/screen.rs index 0d3c09de0..dc1f383f6 100644 --- a/term/src/screen.rs +++ b/term/src/screen.rs @@ -754,7 +754,9 @@ impl Screen { let to_clear = len - self.physical_rows; for _ in 0..to_clear { self.lines.pop_front(); - self.stable_row_index_offset += 1; + if self.allow_scrollback { + self.stable_row_index_offset += 1; + } } }