From 28abb1f9c78ab316126bdf94e2ca12f034f1d8fd Mon Sep 17 00:00:00 2001 From: Christian Duerr Date: Sat, 17 Apr 2021 23:20:13 +0000 Subject: 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. --- alacritty/src/event.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'alacritty/src/event.rs') diff --git a/alacritty/src/event.rs b/alacritty/src/event.rs index 612a0cc0..a895514f 100644 --- a/alacritty/src/event.rs +++ b/alacritty/src/event.rs @@ -1222,6 +1222,7 @@ impl Processor { let text = format(processor.ctx.display.colors[index]); processor.ctx.write_to_pty(text.into_bytes()); }, + TerminalEvent::PtyWrite(text) => processor.ctx.write_to_pty(text.into_bytes()), TerminalEvent::MouseCursorDirty => processor.reset_mouse_cursor(), TerminalEvent::Exit => (), TerminalEvent::CursorBlinkingChange(_) => { -- cgit