nano-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Nano-devel] [PATCH] startup: provide a hint for people unfamiliar with


From: Benno Schulenberg
Subject: [Nano-devel] [PATCH] startup: provide a hint for people unfamiliar with the ^char convention
Date: Wed, 16 May 2018 19:07:59 +0200

But give this hint only when nano was started without any file arguments.
---
 src/nano.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/nano.c b/src/nano.c
index 065425a7..52fdb6e5 100644
--- 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;
-- 
2.17.0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]