mirror of
git://git.sv.gnu.org/nano.git
synced 2024-11-30 08:33:17 +03:00
startup: don't overwrite rcfile error messages on a Linux console
On a Linux VT, refuse to start when there are errors in a nanorc file, so that the messages no longer get overwritten -- which prevented the user from seeing and reading them. This fixes https://savannah.gnu.org/bugs/?54442.
This commit is contained in:
parent
2d434f63e2
commit
52d851a1aa
10
src/rcfile.c
10
src/rcfile.c
@ -1243,6 +1243,16 @@ void do_rcfiles(void)
|
||||
|
||||
check_vitals_mapped();
|
||||
|
||||
#ifdef __linux__
|
||||
/* On a Linux console, don't start nano when there are rcfile errors,
|
||||
* because otherwise these error messages get wiped. */
|
||||
if (on_a_vt && rcfile_with_errors) {
|
||||
fprintf(stderr, _("If needed, use nano with the -I option "
|
||||
"to adjust your nanorc settings.\n"));
|
||||
exit(1);
|
||||
}
|
||||
#endif
|
||||
|
||||
free(nanorc);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user