execute: clear an anchor only when the whole buffer gets filtered

Although an anchor at the top line is rather pointless, it shouldn't
get cleared when the user pipes just a part of the buffer through an
external command.
This commit is contained in:
Benno Schulenberg 2022-03-28 11:38:22 +02:00
parent fcf598e797
commit df7b0a6d97

View File

@ -1070,7 +1070,8 @@ bool execute_command(const char *command)
}
add_undo(CUT, NULL);
do_snip(openfile->mark != NULL, openfile->mark == NULL, FALSE);
openfile->filetop->has_anchor = FALSE;
if (openfile->filetop->next == NULL)
openfile->filetop->has_anchor = FALSE;
update_undo(CUT);
}