diff options
author | Christian Duerr <contact@christianduerr.com> | 2021-04-17 23:20:13 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-17 23:20:13 +0000 |
commit | 28abb1f9c78ab316126bdf94e2ca12f034f1d8fd (patch) | |
tree | 623eabe9b4760fc4674f36a8f953e344b0e655e3 /alacritty_terminal/src/event.rs | |
parent | a312e415951fcb9156572f124b42f68c09f60ae9 (diff) | |
download | alacritty-28abb1f9c78ab316126bdf94e2ca12f034f1d8fd.tar.gz alacritty-28abb1f9c78ab316126bdf94e2ca12f034f1d8fd.zip |
Fix out of order terminal query responses
This forces all responses made to the PTY through the indirection of the
UI event loop, making sure that the writes to the PTY are in the same
order as the original requests.
This just delays all escape sequences by forcing them through the event
loop, ideally all responses which are not asynchronous (like a clipboard
read) would be made immediately. However since some escapes require
feedback from the UI to mutable structures like the config (e.g. color
query escapes), this would require additional locking.
Fixes #4872.
Diffstat (limited to 'alacritty_terminal/src/event.rs')
-rw-r--r-- | alacritty_terminal/src/event.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/alacritty_terminal/src/event.rs b/alacritty_terminal/src/event.rs index 70d16127..fac7a56a 100644 --- a/alacritty_terminal/src/event.rs +++ b/alacritty_terminal/src/event.rs @@ -35,6 +35,9 @@ pub enum Event { /// expected escape sequence format. ColorRequest(usize, Arc<dyn Fn(Rgb) -> String + Sync + Send + 'static>), + /// Write some text to the PTY. + PtyWrite(String), + /// Cursor blinking state has changed. CursorBlinkingChange(bool), @@ -57,6 +60,7 @@ impl Debug for Event { Event::ClipboardStore(ty, text) => write!(f, "ClipboardStore({:?}, {})", ty, text), Event::ClipboardLoad(ty, _) => write!(f, "ClipboardLoad({:?})", ty), Event::ColorRequest(index, _) => write!(f, "ColorRequest({})", index), + Event::PtyWrite(text) => write!(f, "PtyWrite({})", text), Event::Wakeup => write!(f, "Wakeup"), Event::Bell => write!(f, "Bell"), Event::Exit => write!(f, "Exit"), |