tweaks: rename a variable to be more distinct and greppable

master
Benno Schulenberg 2018-02-01 21:50:13 +01:00
parent 919df09ffa
commit a083d7f1e1
4 changed files with 5 additions and 5 deletions

View File

@ -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;

View File

@ -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. */

View File

@ -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;

View File

@ -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) {