Scroll on text input

This commit is contained in:
Jeremy Soller 2023-12-20 15:01:47 -07:00
parent f9f7904117
commit 7f181d0e64
No known key found for this signature in database
GPG key ID: DCFCA852D3906975
3 changed files with 27 additions and 22 deletions

View file

@ -152,7 +152,7 @@ impl cosmic::Application for App {
let terminal = terminal.lock().unwrap();
let rgb = terminal.colors()[index].unwrap_or_default();
let text = f(rgb);
terminal.input(text.into_bytes());
terminal.input_no_scroll(text.into_bytes());
}
}
TermEvent::Exit => {
@ -161,7 +161,7 @@ impl cosmic::Application for App {
TermEvent::PtyWrite(text) => {
if let Some(terminal) = self.tab_model.data::<Mutex<Terminal>>(entity) {
let terminal = terminal.lock().unwrap();
terminal.input(text.into_bytes());
terminal.input_no_scroll(text.into_bytes());
}
}
TermEvent::ResetTitle => {
@ -172,7 +172,7 @@ impl cosmic::Application for App {
if let Some(terminal) = self.tab_model.data::<Mutex<Terminal>>(entity) {
let terminal = terminal.lock().unwrap();
let text = f(terminal.size().into());
terminal.input(text.into_bytes());
terminal.input_no_scroll(text.into_bytes());
}
}
TermEvent::Title(title) => {