undo: differentiate between general filtering and spell checking
With-help-from: David Lawrence Ramsey <pooka109@gmail.com>
Этот коммит содержится в:
родитель
c39c9c241b
Коммит
667fcea65e
@ -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 */
|
||||
|
@ -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");
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user