From 3c4a5dcecd7f49af891a6ddae1f134efa530e141 Mon Sep 17 00:00:00 2001 From: Adam Perkowski Date: Wed, 2 Oct 2024 23:47:27 +0200 Subject: [PATCH] vt100 patches (#743) Co-authored-by: JEEVITHA KANNAN K S --- Cargo.lock | 3 +-- Cargo.toml | 3 +++ tui/src/running_command.rs | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c33834f6..9e70df7d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1235,8 +1235,7 @@ checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" [[package]] name = "vt100" version = "0.15.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84cd863bf0db7e392ba3bd04994be3473491b31e66340672af5d11943c6274de" +source = "git+https://github.com/ChrisTitusTech/vt100-rust#e41fb3d8fb5fd01dd2d076c9a25823a31656012f" dependencies = [ "itoa", "log", diff --git a/Cargo.toml b/Cargo.toml index 27257d9c..cf43a012 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,6 +9,9 @@ ego-tree = "0.6.2" members = ["tui", "core"] resolver = "2" +[patch.crates-io] +vt100 = { git = "https://github.com/ChrisTitusTech/vt100-rust" } + [profile.release] opt-level = "z" debug = false diff --git a/tui/src/running_command.rs b/tui/src/running_command.rs index ce7bee02..89daa755 100644 --- a/tui/src/running_command.rs +++ b/tui/src/running_command.rs @@ -258,7 +258,7 @@ impl RunningCommand { let buffer = mutex.as_ref().unwrap(); parser.process(buffer); // Adjust the screen content based on the scroll offset - parser.set_scrollback(self.scroll_offset); + parser.screen_mut().set_scrollback(self.scroll_offset); parser.screen().clone() }