commit df7b0a6d977d13c669c097f825de52081492f9b1
parent fcf598e79790a3156c277c065186599955017a0d
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Mon, 28 Mar 2022 11:38:22 +0200
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.
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/files.c b/src/files.c
@@ -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);
}