From 45ec2464e59064f0030e900d673bf5cf5799212f Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Sat, 14 Sep 2024 06:42:10 -0700 Subject: [PATCH] docs and related fix for #6099 We should avoid nudging the scrollback position when there is no scrollback allowed in this other case as well. refs: https://github.com/wez/wezterm/pull/6099 --- docs/changelog.md | 2 ++ term/src/screen.rs | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) 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; + } } }