display: do not show the state flags in the help viewer or file browser

The state flags are relevant only when editing.

This fixes https://savannah.gnu.org/bugs/?59744.
Indirectly-reported-by: ObeliX <ObeliX-@gmx.de>

Bug existed since version 5.3, since --stateflags was introduced.
master
Benno Schulenberg 2020-12-21 14:54:49 +01:00
parent 1b65d39722
commit 5c4c30e26b
1 changed files with 1 additions and 1 deletions

View File

@ -2004,7 +2004,7 @@ void titlebar(const char *path)
#ifndef NANO_TINY
/* When requested, show on the title bar the state of three options and
* the state of the mark and whether a macro is being recorded. */
if (ISSET(STATEFLAGS) && !ISSET(VIEW_MODE)) {
if (*state && ISSET(STATEFLAGS) && !ISSET(VIEW_MODE)) {
if (openfile->modified && COLS > 1)
waddstr(topwin, " *");
if (statelen < COLS) {