diff --git a/src/files.c b/src/files.c index 4408c053..c137b093 100644 --- a/src/files.c +++ b/src/files.c @@ -523,6 +523,7 @@ void replace_buffer(const char *filename) #ifndef NANO_TINY add_undo(COUPLE_BEGIN); + openfile->undotop->strdata = mallocstrcpy(NULL, _("spelling correction")); #endif /* Throw away the text of the file. */ @@ -544,6 +545,7 @@ void replace_buffer(const char *filename) #ifndef NANO_TINY add_undo(COUPLE_END); + openfile->undotop->strdata = mallocstrcpy(NULL, _("spelling correction")); #endif } @@ -567,6 +569,7 @@ void replace_marked_buffer(const char *filename) SET(NO_NEWLINES); add_undo(COUPLE_BEGIN); + openfile->undotop->strdata = mallocstrcpy(NULL, _("spelling correction")); /* Throw away the text under the mark. */ cutbuffer = NULL; @@ -584,6 +587,7 @@ void replace_marked_buffer(const char *filename) UNSET(NO_NEWLINES); add_undo(COUPLE_END); + openfile->undotop->strdata = mallocstrcpy(NULL, _("spelling correction")); } #endif /* !NANO_TINY */ #endif /* ENABLE_SPELLER */ diff --git a/src/text.c b/src/text.c index 76ec3600..fc1c592c 100644 --- a/src/text.c +++ b/src/text.c @@ -796,7 +796,7 @@ void do_undo(void) cutbottom = oldcutbottom; break; case COUPLE_BEGIN: - undidmsg = _("filtering"); + undidmsg = u->strdata; break; case COUPLE_END: openfile->current_undo = openfile->current_undo->next; @@ -968,7 +968,7 @@ void do_redo(void) do_redo(); return; case COUPLE_END: - redidmsg = _("filtering"); + redidmsg = u->strdata; break; case INDENT: handle_indent_action(u, FALSE, TRUE); @@ -1182,6 +1182,7 @@ bool execute_command(const char *command) #endif { add_undo(COUPLE_BEGIN); + openfile->undotop->strdata = mallocstrcpy(NULL, _("filtering")); if (openfile->mark == NULL) { openfile->current = openfile->fileage; openfile->current_x = 0; @@ -1231,8 +1232,10 @@ bool execute_command(const char *command) else read_file(stream, 0, "pipe", TRUE); - if (should_pipe && !ISSET(MULTIBUFFER)) + if (should_pipe && !ISSET(MULTIBUFFER)) { add_undo(COUPLE_END); + openfile->undotop->strdata = mallocstrcpy(NULL, _("filtering")); + } if (wait(NULL) == -1) nperror("wait");