startup: check again for a Linux console after reading all files
When there is a dash among the files on the command line, nano will read data from standard input, which means that the latter is not connected to a terminal and thus cannot be recognized as a Linux VT until nano has finished reading the input and has reconnected the input source to the terminal. The first probe for a Linux VT is kept in place for now, so that nano can stop when there are errors in an rcfile while running on a VT. (This stopping will not work when data is read from standard input, of course, but that is a smaller fish.) This fixes https://savannah.gnu.org/bugs/?55912. Reported-by: Enrico Mioso <mrkiko.rs@gmail.com> Bug existed since the recognition of modified cursor keys on a Linux console was introduced, in version 2.6.3, commit 290d278f.
Этот коммит содержится в:
родитель
169da8aec0
Коммит
19a833c94e
@ -2685,6 +2685,11 @@ int main(int argc, char **argv)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef __linux__
|
||||
/* Check again whether we're running on a Linux console. */
|
||||
on_a_vt = (ioctl(0, VT_GETSTATE, &dummy) == 0);
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG
|
||||
fprintf(stderr, "Main: show title bar, and enter main loop\n");
|
||||
#endif
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user