From: Benno Schulenberg Date: Mon, 5 May 2014 19:54:34 +0000 (+0000) Subject: Allowing the function do_cut_till_end() to be rebound. X-Git-Tag: v2.3.3~90 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=f8507bb9a1a2d409d0ed2146c19402dc564c2b5c;p=nano.git 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 --- diff --git a/ChangeLog b/ChangeLog index 28a5c0a2..869309ef 100644 --- 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 * src/winio.c (statusbar): Elide a variable. diff --git a/doc/man/nanorc.5 b/doc/man/nanorc.5 index 100083f3..e0af6e28 100644 --- 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 index ac3d17cc..aa16a89f 100644 --- 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"))