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"))