[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master e3cebbb: Replay key if kboard is interrupted while initializing (
From: |
Eli Zaretskii |
Subject: |
master e3cebbb: Replay key if kboard is interrupted while initializing (Bug#37782) |
Date: |
Sat, 26 Oct 2019 06:30:28 -0400 (EDT) |
branch: master
commit e3cebbb839fc94f314659bf667c6790edebf4297
Author: memeplex <address@hidden>
Commit: Eli Zaretskii <address@hidden>
Replay key if kboard is interrupted while initializing (Bug#37782)
The problem with the original fix for bug#5095 is that it drops
the current event, which is a valid character event and not -2.
Thus, the first ESC character sent by the terminal after turning
on focus tracking is lost and we get '[' and 'I' events separately
inserted into the buffer afterwards.
* src/keyboard.c (read_key_sequence): Add key as mock_input and replay
sequence using new keyboard, when the key is not -2.
---
src/keyboard.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/src/keyboard.c b/src/keyboard.c
index 56ab790..0eab8fd 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -9596,7 +9596,16 @@ read_key_sequence (Lisp_Object *keybuf, Lisp_Object
prompt,
Fcons (make_lispy_switch_frame (frame),
KVAR (interrupted_kboard, kbd_queue)));
}
- mock_input = 0;
+ if (FIXNUMP (key) && XFIXNUM (key) == -2)
+ mock_input = 0;
+ else
+ {
+ /* If interrupted while initializing terminal, we
+ need to replay the interrupting key. See
+ Bug#5095 and Bug#37782. */
+ mock_input = 1;
+ keybuf[0] = key;
+ }
goto replay_entire_sequence;
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master e3cebbb: Replay key if kboard is interrupted while initializing (Bug#37782),
Eli Zaretskii <=