startup: provide a hint for people unfamiliar with the ^char convention

But give this hint only when nano was started without any file arguments.
master
Benno Schulenberg 2018-05-16 17:36:14 +02:00
parent 3628863f90
commit 4ec19847a3
1 changed files with 6 additions and 0 deletions

View File

@ -2642,6 +2642,12 @@ int main(int argc, char **argv)
if (rcfile_with_errors != NULL)
statusline(ALERT, _("Mistakes in '%s'"), rcfile_with_errors);
#ifdef ENABLE_HELP
if (*openfile->filename == '\0' && openfile->totsize == 0 &&
openfile->next == openfile && !ISSET(NO_HELP))
statusbar(_("Welcome to nano. For basic help, type Ctrl+G."));
#endif
while (TRUE) {
#ifdef ENABLE_LINENUMBERS
int needed_margin = digits(openfile->filebot->lineno) + 1;