aboutsummaryrefslogtreecommitdiff
path: root/vendor
diff options
context:
space:
mode:
authorOgulcan Celik <ogulcancelik@gmail.com>2026-03-31 23:03:11 +0300
committerOgulcan Celik <ogulcancelik@gmail.com>2026-03-31 23:03:11 +0300
commite857710d73ad660d17ce39fa3201a39aa49f6932 (patch)
tree7fa2db20fc6c4e78b9d182af449784ed48515c9e /vendor
parent5f97b0c26d848ef36aed70df906893907e2d0686 (diff)
fix: align pane scrolling with tmux and ghostty
Diffstat (limited to 'vendor')
-rw-r--r--vendor/vt100/src/grid.rs7
-rw-r--r--vendor/vt100/src/screen.rs4
2 files changed, 3 insertions, 8 deletions
diff --git a/vendor/vt100/src/grid.rs b/vendor/vt100/src/grid.rs
index b1c5d341..f8958579 100644
--- a/vendor/vt100/src/grid.rs
+++ b/vendor/vt100/src/grid.rs
@@ -59,11 +59,6 @@ impl Grid {
self.saved_origin_mode = false;
}
- pub fn clear_scrollback(&mut self) {
- self.scrollback.clear();
- self.scrollback_offset = 0;
- }
-
pub fn size(&self) -> Size {
self.size
}
@@ -568,6 +563,8 @@ impl Grid {
self.rows
.insert(usize::from(self.scroll_bottom) + 1, self.new_row());
let removed = self.rows.remove(usize::from(self.scroll_top));
+ // Top-anchored scroll regions still represent terminal output moving
+ // off the visible transcript and should feed host scrollback.
if self.scrollback_len > 0 && self.scroll_top == 0 {
self.scrollback.push_back(removed);
while self.scrollback.len() > self.scrollback_len {
diff --git a/vendor/vt100/src/screen.rs b/vendor/vt100/src/screen.rs
index a11ed776..7dfec97d 100644
--- a/vendor/vt100/src/screen.rs
+++ b/vendor/vt100/src/screen.rs
@@ -73,7 +73,7 @@ impl Screen {
grid.allocate_rows();
Self {
grid,
- alternate_grid: crate::grid::Grid::new(size, scrollback_len),
+ alternate_grid: crate::grid::Grid::new(size, 0),
attrs: crate::attrs::Attrs::default(),
saved_attrs: crate::attrs::Attrs::default(),
@@ -652,7 +652,6 @@ impl Screen {
self.grid_mut().set_scrollback(0);
self.set_mode(MODE_ALTERNATE_SCREEN);
self.alternate_grid.allocate_rows();
- self.grid_mut().set_scrollback(0);
}
fn exit_alternate_grid(&mut self) {
@@ -1165,7 +1164,6 @@ impl Screen {
[1049] => {
self.decsc();
self.alternate_grid.clear();
- self.alternate_grid.clear_scrollback();
self.enter_alternate_grid();
}
[2004] => self.set_mode(MODE_BRACKETED_PASTE),