commit 4ec19847a3f3baaadc80e6bad69557c8cf7a56e6
parent 3628863f90d9ad064a32bff8bead419ad8b039a8
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Wed, 16 May 2018 17:36:14 +0200
startup: provide a hint for people unfamiliar with the ^char convention
But give this hint only when nano was started without any file arguments.
Diffstat:
1 file changed, 6 insertions(+), 0 deletions(-)
diff --git a/src/nano.c b/src/nano.c
@@ -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;