commit 4d92dffb3aa725e15de3fb789262043b4e42c7c8
parent 4c1c425bbbc364b7e4c98088ef9bef64b871d959
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Sat, 28 Apr 2018 12:01:23 +0200
bindings: rename constupdate to constantshow, cuttoend to cutfromcursor
This makes the names of these bindable functions equal to the names of
their corresponding options -- like for all the other toggles that have
a corresponding option.
Diffstat:
3 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/doc/nano.texi b/doc/nano.texi
@@ -1347,7 +1347,7 @@ Goes to the last file when using the file browser (reading or writing files).
@item nohelp
Toggles the presence of the two-line list of key bindings at the bottom of the screen.
-@item constupdate
+@item constantshow
Toggles the constant display of the current line, column, and character positions.
@item morespace
@@ -1374,7 +1374,7 @@ Toggles the smartness of the Home key.
@item autoindent
Toggles whether new lines will contain the same amount of whitespace as the preceding line.
-@item cuttoend
+@item cutfromcursor
Toggles whether cutting text will cut the whole line or just from the current cursor
position to the end of the line.
diff --git a/doc/nanorc.5 b/doc/nanorc.5
@@ -703,7 +703,7 @@ Goes to the last file when using the file browser (reading or writing files).
.B nohelp
Toggles the presence of the two-line list of key bindings at the bottom of the screen.
.TP
-.B constupdate
+.B constantshow
Toggles the constant display of the current line, column, and character positions.
.TP
.B morespace
@@ -730,7 +730,7 @@ Toggles the smartness of the Home key.
.B autoindent
Toggles whether new lines will contain the same amount of whitespace as the preceding line.
.TP
-.B cuttoend
+.B cutfromcursor
Toggles whether cutting text will cut the whole line or just from the current cursor
position to the end of the line.
.TP
diff --git a/src/global.c b/src/global.c
@@ -1659,7 +1659,8 @@ sc *strtosc(const char *input)
s->func = do_toggle_void;
if (!strcasecmp(input, "nohelp"))
s->toggle = NO_HELP;
- else if (!strcasecmp(input, "constupdate"))
+ else if (!strcasecmp(input, "constantshow") ||
+ !strcasecmp(input, "constupdate")) /* Deprecated. Remove end of 2018. */
s->toggle = CONSTANT_SHOW;
else if (!strcasecmp(input, "morespace"))
s->toggle = MORE_SPACE;
@@ -1681,7 +1682,8 @@ sc *strtosc(const char *input)
s->toggle = SMART_HOME;
else if (!strcasecmp(input, "autoindent"))
s->toggle = AUTOINDENT;
- else if (!strcasecmp(input, "cuttoend"))
+ else if (!strcasecmp(input, "cutfromcursor") ||
+ !strcasecmp(input, "cuttoend")) /* Deprecated. Remove end of 2018. */
s->toggle = CUT_FROM_CURSOR;
#ifdef ENABLE_WRAPPING
else if (!strcasecmp(input, "nowrap"))