[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#37782: Emacs 27 client adding [I] to the beginning of the buffer
From: |
Carlos Pita |
Subject: |
bug#37782: Emacs 27 client adding [I] to the beginning of the buffer |
Date: |
Sat, 19 Oct 2019 00:20:05 -0300 |
After hours and hours (and hours) of life sucking debugging I found
out the offending code (in read_key_sequence):
if ((FIXNUMP (key) && XFIXNUM (key) == -2) /* wrong_kboard_jmpbuf */
/* When switching to a new tty (with a new keyboard),
read_char returns the new buffer, rather than -2
(Bug#5095). This is because `terminal-init-xterm'
calls read-char, which eats the wrong_kboard_jmpbuf
return. Any better way to fix this? -- cyd */
|| (interrupted_kboard != current_kboard))
{
....
mock_input = 0;
goto replay_entire_sequence;
}
The problem with the fix for #5095 is that it's dropping the current
event, which is a valid char event and not -2. Thus, the first esc
char sent by the terminal after turning on focus tracking is lost and
we get `[`, `I` events separately inserted into the buffer afterwards.
Attached is a patch that replays key as mock input when it's not -2.
Can I ask for some of my hidpi fringe or colorized comint/python
history patches to be merged in exchange ;) ?
Best regards
--
Carlos
0001-Replay-key-if-kboard-is-interrupted-while-initializi.patch
Description: Text Data
- bug#37782: Emacs 27 client adding [I] to the beginning of the buffer, Carlos Pita, 2019/10/16
- bug#37782: Emacs 27 client adding [I] to the beginning of the buffer, Carlos Pita, 2019/10/16
- bug#37782: Emacs 27 client adding [I] to the beginning of the buffer, Carlos Pita, 2019/10/16
- bug#37782: Emacs 27 client adding [I] to the beginning of the buffer, Eli Zaretskii, 2019/10/17
- bug#37782: Emacs 27 client adding [I] to the beginning of the buffer, Carlos Pita, 2019/10/17
- bug#37782: Emacs 27 client adding [I] to the beginning of the buffer, Carlos Pita, 2019/10/17
- bug#37782: Emacs 27 client adding [I] to the beginning of the buffer, Carlos Pita, 2019/10/17
- bug#37782: Emacs 27 client adding [I] to the beginning of the buffer, Eli Zaretskii, 2019/10/17
- bug#37782: Emacs 27 client adding [I] to the beginning of the buffer, Carlos Pita, 2019/10/18
- bug#37782: Emacs 27 client adding [I] to the beginning of the buffer,
Carlos Pita <=
- bug#37782: Emacs 27 client adding [I] to the beginning of the buffer, Eli Zaretskii, 2019/10/19
- bug#37782: Emacs 27 client adding [I] to the beginning of the buffer, Eli Zaretskii, 2019/10/26
- bug#37782: Emacs 27 client adding [I] to the beginning of the buffer, Eli Zaretskii, 2019/10/17
- bug#37782: Emacs 27 client adding [I] to the beginning of the buffer, Eli Zaretskii, 2019/10/17