commit f8507bb9a1a2d409d0ed2146c19402dc564c2b5c
parent dcb055767099e301bdf0703696d2dc5a7678b9a2
Author: Benno Schulenberg <bensberg@justemail.net>
Date: Mon, 5 May 2014 19:54:34 +0000
Allowing the function do_cut_till_end() to be rebound.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4840 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
Diffstat:
3 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
@@ -2,6 +2,8 @@
* doc/man/nanorc.5: Give syntax highlighting its own section,
add the "header" command, tweak some wording and formatting,
and trim some duplicate introductory information.
+ * src/global.c (strtosc), doc/man/nanorc.5: Allow the function
+ do_cut_till_end (naming it "cutrestoffile") to be rebound.
2014-05-04 Benno Schulenberg <bensberg@justemail.net>
* src/winio.c (statusbar): Elide a variable.
diff --git a/doc/man/nanorc.5 b/doc/man/nanorc.5
@@ -387,8 +387,11 @@ Copy the currently stored text into the current buffer position.
.B mark
Begin selecting text for cutting at the current position.
.TP
+.B cutrestoffile
+Cut all text from the cursor position till the end of the buffer.
+.TP
.B curpos
-Show the current line, column, word positions in the file.
+Show the current cursor position: the line, column, and character positions.
.TP
.B wordcount
Count the number of words in the current buffer.
diff --git a/src/global.c b/src/global.c
@@ -1278,6 +1278,8 @@ sc *strtosc(char *input)
else if (!strcasecmp(input, "uncut"))
s->scfunc = do_uncut_text;
#ifndef NANO_TINY
+ else if (!strcasecmp(input, "cutrestoffile"))
+ s->scfunc = do_cut_till_end;
else if (!strcasecmp(input, "copytext"))
s->scfunc = do_copy_text;
else if (!strcasecmp(input, "mark"))