Make oldstyle correctly suppress line editing.

This commit is contained in:
Eric S. Raymond 2024-09-20 10:29:37 -04:00
parent 8dcc6e6641
commit 3d6c689ffa
2 changed files with 4 additions and 1 deletions

View file

@ -2,6 +2,9 @@
// SPDX-FileCopyrightText: (C) Eric S. Raymond <esr@thyrsus.com>
// SPDX-License-Identifier: CC-BY-4.0
Repository head::
Make oldstyle correctly suppress line editing.
1.19: 2024-06-27::
Ensore that the KNIVES_VANISH message can't issue twice.

2
main.c
View file

@ -81,7 +81,7 @@ char *myreadline(const char *prompt) {
}
}
if (isatty(fileno(settings.scriptfp))) {
if (isatty(fileno(settings.scriptfp)) && !settings.oldstyle) {
free(buf); // LCOV_EXCL_LINE
return readline(prompt); // LCOV_EXCL_LINE
} else {