input: detect again when both Shift and Ctrl are being held on a VT
In nano 2.7.1 and 2.7.2, pressing Shift+Ctrl+Arrow on a Linux console
would behave as if Shift wasn't held. It got broken three months ago,
by commit 08cd197b
, messing up the proper order of the checks.
This fixes https://savannah.gnu.org/bugs/?49906.
master
parent
2b1bc6866a
commit
db897b574f
10
src/winio.c
10
src/winio.c
|
@ -539,6 +539,11 @@ int parse_kbinput(WINDOW *win)
|
|||
unsigned char modifiers = 6;
|
||||
|
||||
if (console && ioctl(0, TIOCLINUX, &modifiers) >= 0) {
|
||||
#ifndef NANO_TINY
|
||||
/* Is Shift being held? */
|
||||
if (modifiers & 0x01)
|
||||
shift_held = TRUE;
|
||||
#endif
|
||||
/* Is Ctrl being held? */
|
||||
if (modifiers & 0x04) {
|
||||
if (retval == KEY_UP)
|
||||
|
@ -550,12 +555,7 @@ int parse_kbinput(WINDOW *win)
|
|||
else if (retval == KEY_RIGHT)
|
||||
return sc_seq_or(do_next_word_void, controlright);
|
||||
}
|
||||
|
||||
#ifndef NANO_TINY
|
||||
/* Is Shift being held? */
|
||||
if (modifiers & 0x01)
|
||||
shift_held =TRUE;
|
||||
|
||||
/* Are both Shift and Alt being held? */
|
||||
if ((modifiers & 0x09) == 0x09) {
|
||||
if (retval == KEY_UP)
|
||||
|
|
Loading…
Reference in New Issue