diff --git a/ChangeLog b/ChangeLog index 21f18849cef52e9da466cce2de48a4db2d2831de..0df1b1294aab162c89bf8b4e35f88ba5d44b6332 100644 --- a/ChangeLog +++ b/ChangeLog @@ -6,6 +6,8 @@ of titlecolor, statuscolor, keycolor and functioncolor. * doc/man/nanorc.5, doc/texinfo/nano.tex: Show quotes where quotes are needed, remove some unneeded spaces, and do other tweaks. + * src/global.c (strtosc), doc/man/nanorc.5: Allow the Backwards + toggle to be rebound, document it, and document Backspace too. 2014-05-03 Benno Schulenberg <bensberg@justemail.net> * src/*.h, src/*.c: Add the ability to colour four elements of diff --git a/doc/man/nanorc.5 b/doc/man/nanorc.5 index 3b4619ec65cd4948b7a55c86d515a26be06eecde..573295f50d06e7ff294a655b6abdf9e0fb736758 100644 --- a/doc/man/nanorc.5 +++ b/doc/man/nanorc.5 @@ -475,6 +475,9 @@ Insert a new line below the current one. .B delete Delete the character under the cursor. .TP +.B backspace +Delete the character before the cursor. +.TP .B undo Undo the text action peformed (add text, delete text, etc). .TP @@ -494,6 +497,9 @@ Toggle case sensitivity in searching (search/replace menus only). .B regexp Toggle whether searching/replacing is based on literal strings or regular expressions. .TP +.B backwards +Toggle whether searching/replacing goes forward or backward. +.TP .B prevhistory Show the previous history entry in the prompt menus (e.g. search). .TP diff --git a/src/global.c b/src/global.c index 1dce73a458fc337b64c642e12063799a70252b6e..d85d3f9efd0026d910d2bb08079be220370109c4 100644 --- a/src/global.c +++ b/src/global.c @@ -1451,6 +1451,9 @@ sc *strtosc(char *input) !strcasecmp(input, "regex")) { s->scfunc = regexp_void; s->execute = FALSE; + } else if (!strcasecmp(input, "backwards") { + s->scfunc = backwards_void; + s->execute = FALSE; } else if (!strcasecmp(input, "dontreplace")) { s->scfunc = no_replace_void; s->execute = FALSE;