1
1

startup: show the helpful message only when ^G has not been rebound

(Well, it now checks that ^G is still the first shortcut that is bound
to 'do_help', but that is good enough: if the user did any rebinding,
they probably do not need any reminder about how to invoke 'Help'.)

This fixes https://savannah.gnu.org/bugs/?60315.
Reported-by: Robert Goulding <goulding.2@nd.edu>
Этот коммит содержится в:
Benno Schulenberg 2021-04-01 09:45:55 +02:00
родитель 0dcac9188f
Коммит 20e122ef41

Просмотреть файл

@ -2502,11 +2502,16 @@ int main(int argc, char **argv)
#ifdef ENABLE_NANORC
if (startup_problem != NULL)
statusline(ALERT, startup_problem);
#define NOTREBOUND first_sc_for(MMAIN, do_help) && \
first_sc_for(MMAIN, do_help)->keycode == 0x07
#else
#define NOTREBOUND TRUE
#endif
#ifdef ENABLE_HELP
if (*openfile->filename == '\0' && openfile->totsize == 0 &&
openfile->next == openfile && !ISSET(NO_HELP))
openfile->next == openfile && !ISSET(NO_HELP) && NOTREBOUND)
statusbar(_("Welcome to nano. For basic help, type Ctrl+G."));
#endif