diff --git a/src/files.c b/src/files.c index 8e2955d0..a2338379 100644 --- a/src/files.c +++ b/src/files.c @@ -1057,6 +1057,7 @@ bool execute_command(const char *command) } add_undo(CUT, NULL); do_snip(openfile->mark != NULL, openfile->mark == NULL, FALSE); + openfile->filetop->has_anchor = FALSE; update_undo(CUT); } diff --git a/src/text.c b/src/text.c index 29a17d5f..088f3012 100644 --- a/src/text.c +++ b/src/text.c @@ -2446,8 +2446,10 @@ const char *treat(char *tempfile_name, char *theprogram, bool spelling) openfile->current_x = strlen(openfile->current->data); #ifndef NANO_TINY - if (replaced) + if (replaced) { + openfile->filetop->has_anchor = FALSE; update_undo(COUPLE_END); + } #endif openfile->placewewant = pww_save;