commit 2c7d3367115bafafbad2b07be416261fb50cc5e2
parent 15c3e924b899a37de9d6d0ffb0fe574864b1c110
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Sun, 24 Feb 2019 17:04:17 +0100
bindings: rename 'cutwordleft' to 'chopwordleft', and similar for right
These bindable functions should not connote cutting, as they don't put
anything into the cutbuffer.
Diffstat:
4 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/doc/nano.texi b/doc/nano.texi
@@ -1183,13 +1183,13 @@ current cursor position.
Throws away the current line (or the marked region).
(This function is bound by default to <Meta+Delete>.)
-@item cutwordleft
+@item chopwordleft
Deletes from the cursor position to the beginning of the preceding word.
(This function is bound by default to <Shift+Ctrl+Delete>. If your terminal
produces @code{^H} for <Ctrl+Backspace>, you can make <Ctrl+Backspace> delete
the word to the left of the cursor by rebinding ^H to this function.)
-@item cutwordright
+@item chopwordright
Deletes from the cursor position to the beginning of the next word.
(This function is bound by default to <Ctrl+Delete>.)
diff --git a/doc/nanorc.5 b/doc/nanorc.5
@@ -524,13 +524,13 @@ current cursor position.
Throws away the current line (or the marked region).
(This function is bound by default to <Meta+Delete>.)
.TP
-.B cutwordleft
+.B chopwordleft
Deletes from the cursor position to the beginning of the preceding word.
(This function is bound by default to <Shift+Ctrl+Delete>. If your terminal
produces \fB^H\fR for <Ctrl+Backspace>, you can make <Ctrl+Backspace> delete
the word to the left of the cursor by rebinding ^H to this function.)
.TP
-.B cutwordright
+.B chopwordright
Deletes from the cursor position to the beginning of the next word.
(This function is bound by default to <Ctrl+Delete>.)
.TP
diff --git a/doc/sample.nanorc.in b/doc/sample.nanorc.in
@@ -270,7 +270,7 @@
## keycode, which is hard-bound to the backspace function. So, if you
## normally use <Backspace> for backspacing and not ^H, you can make
## <Ctrl+Backspace> delete the word to the left of the cursor with:
-# bind ^H cutwordleft main
+# bind ^H chopwordleft main
## If you would like nano to have keybindings that are more "usual",
## such as ^O for Open, ^F for Find, ^H for Help, and ^Q for Quit,
diff --git a/src/global.c b/src/global.c
@@ -1519,9 +1519,11 @@ sc *strtosc(const char *input)
s->func = do_indent;
else if (!strcasecmp(input, "unindent"))
s->func = do_unindent;
- else if (!strcasecmp(input, "cutwordleft"))
+ else if (!strcasecmp(input, "chopwordleft") ||
+ !strcasecmp(input, "cutwordleft")) /* Deprecated; remove in 2020. */
s->func = do_cut_prev_word;
- else if (!strcasecmp(input, "cutwordright"))
+ else if (!strcasecmp(input, "chopwordright") ||
+ !strcasecmp(input, "cutwordright")) /* Deprecated; remove in 2020. */
s->func = do_cut_next_word;
else if (!strcasecmp(input, "findbracket"))
s->func = do_find_bracket;