tweaks: rename a variable to be more distinct and greppable
parent
919df09ffa
commit
a083d7f1e1
|
@ -32,8 +32,8 @@ volatile sig_atomic_t the_window_resized = FALSE;
|
|||
#endif
|
||||
|
||||
#ifdef __linux__
|
||||
bool console;
|
||||
/* Whether we're running on a Linux VC (TRUE) or under X (FALSE). */
|
||||
bool on_a_vt;
|
||||
/* Whether we're running on a Linux VT or on something else. */
|
||||
#endif
|
||||
|
||||
bool meta_key;
|
||||
|
|
|
@ -1994,7 +1994,7 @@ int main(int argc, char **argv)
|
|||
struct vt_stat dummy;
|
||||
|
||||
/* Check whether we're running on a Linux console. */
|
||||
console = (ioctl(0, VT_GETSTATE, &dummy) == 0);
|
||||
on_a_vt = (ioctl(0, VT_GETSTATE, &dummy) == 0);
|
||||
#endif
|
||||
|
||||
/* Back up the terminal settings so that they can be restored. */
|
||||
|
|
|
@ -30,7 +30,7 @@ extern volatile sig_atomic_t the_window_resized;
|
|||
#endif
|
||||
|
||||
#ifdef __linux__
|
||||
extern bool console;
|
||||
extern bool on_a_vt;
|
||||
#endif
|
||||
|
||||
extern bool meta_key;
|
||||
|
|
|
@ -573,7 +573,7 @@ int parse_kbinput(WINDOW *win)
|
|||
* Shift/Ctrl/Alt are being held together with them. */
|
||||
unsigned char modifiers = 6;
|
||||
|
||||
if (console && ioctl(0, TIOCLINUX, &modifiers) >= 0) {
|
||||
if (on_a_vt && ioctl(0, TIOCLINUX, &modifiers) >= 0) {
|
||||
#ifndef NANO_TINY
|
||||
/* Is Shift being held? */
|
||||
if (modifiers & 0x01) {
|
||||
|
|
Loading…
Reference in New Issue