diff --git a/doc/man/nanorc.5 b/doc/man/nanorc.5 index 9da9b0574e2bd2d29f274bb86d4c318545e9d097..df318b61bc2a0fb258835a304e45e1777b9ea328 100644 --- a/doc/man/nanorc.5 +++ b/doc/man/nanorc.5 @@ -396,6 +396,12 @@ Count the number of words in the current buffer. .B refresh Refresh the screen. .TP +.B undo +Undo the text action peformed (add text, delete text, etc). +.TP +.B suspend +Redo the last action which was undone. +.TP .B suspend Suspend the editor (if the suspend function is enabled, see the "suspendenable" entry below). diff --git a/src/global.c b/src/global.c index bf26ae205739c554d2d16d3b35d19eff9cbce1be..824f93935407f305a2869e053ffd2f759c63bf79 100644 --- a/src/global.c +++ b/src/global.c @@ -1339,6 +1339,10 @@ sc *strtosc(int menu, char *input) s->scfunc = do_find_bracket; else if (!strcasecmp(input, "wordcount")) s->scfunc = do_wordlinechar_count; + else if (!strcasecmp(input, "undo")) + s->scfunc = do_undo; + else if (!strcasecmp(input, "redo")) + s->scfunc = do_redo; else if (!strcasecmp(input, "prevhistory")) { s->scfunc = (void *) prev_history_msg; s->execute = FALSE;