nano-devel
[Top][All Lists]
Advanced

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

[Nano-devel] [PATCH] general: add the option -g/--showcursor, to match P


From: Benno Schulenberg
Subject: [Nano-devel] [PATCH] general: add the option -g/--showcursor, to match Pico
Date: Sun, 23 Oct 2016 13:01:21 +0200

The nanorc option already exists, but not the corresponding one for
the command line.
---
 doc/man/nano.1        | 6 +++++-
 doc/texinfo/nano.texi | 6 +++++-
 src/nano.c            | 7 ++++++-
 3 files changed, 16 insertions(+), 3 deletions(-)

diff --git a/doc/man/nano.1 b/doc/man/nano.1
index 68274ec..2f633d6 100644
--- a/doc/man/nano.1
+++ b/doc/man/nano.1
@@ -172,6 +172,10 @@ Interpret the Delete key differently so that both 
Backspace and Delete
 work properly.  You should only need to use this option if Backspace
 acts like Delete on your system.
 .TP
+.BR \-g ", " \-\-showcursor
+Make the cursor visible in the file browser, putting it on the highlighted
+item.  Useful for braille users.
+.TP
 .BR \-h ", " \-\-help
 Show a summary of the available command-line options and exit.
 .TP
@@ -251,7 +255,7 @@ continuing it over multiple screen lines.  Since
 this option last when using other options (e.g.\& 'nano \-wS$') or pass it
 separately (e.g.\& 'nano \-wS \-$').
 .TP
-.BR \-a ", " \-b ", " \-e ", " \-f ", " \-g ", " \-j
+.BR \-a ", " \-b ", " \-e ", " \-f ", " \-j
 Ignored, for compatibility with Pico.
 
 .SH TOGGLES
diff --git a/doc/texinfo/nano.texi b/doc/texinfo/nano.texi
index d87d077..9146995 100644
--- a/doc/texinfo/nano.texi
+++ b/doc/texinfo/nano.texi
@@ -256,6 +256,11 @@ Interpret the Delete key differently so that both 
Backspace and Delete
 work properly.  You should only need to use this option if Backspace
 acts like Delete on your system.
 
address@hidden -g
address@hidden --showcursor
+Make the cursor visible in the file browser, putting it on the
+highlighted item.  Useful for braille users.
+
 @item -h
 @itemx --help
 Show a summary of command-line options and exit.
@@ -372,7 +377,6 @@ separately (e.g.@: @code{nano -wS -$}).
 @itemx -b
 @itemx -e
 @itemx -f
address@hidden -g
 @itemx -j
 Ignored, for compatibility with Pico.
 
diff --git a/src/nano.c b/src/nano.c
index f237d70..83f4726 100644
--- a/src/nano.c
+++ b/src/nano.c
@@ -1998,6 +1998,9 @@ int main(int argc, char **argv)
 #endif
        {"constantshow", 0, NULL, 'c'},
        {"rebinddelete", 0, NULL, 'd'},
+#ifndef DISABLE_BROWSER
+       {"showcursor", 0, NULL, 'g'},
+#endif
        {"help", 0, NULL, 'h'},
 #ifdef ENABLE_LINENUMBERS
        {"linenumbers", 0, NULL, 'l'},
@@ -2095,7 +2098,6 @@ int main(int argc, char **argv)
            case 'b':
            case 'e':
            case 'f':
-           case 'g':
            case 'j':
                /* Pico compatibility flags. */
                break;
@@ -2204,6 +2206,9 @@ int main(int argc, char **argv)
            case 'd':
                SET(REBIND_DELETE);
                break;
+           case 'g':
+               SET(SHOW_CURSOR);
+               break;
 #ifndef NANO_TINY
            case 'i':
                SET(AUTOINDENT);
-- 
2.9.3




reply via email to

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