tweaks: reshuffle a few lines, for esthetics and to elide an #ifdef

master
Benno Schulenberg 2021-09-17 10:06:21 +02:00
parent 802a20b222
commit 04f8aa83ef
1 changed files with 7 additions and 7 deletions

View File

@ -1933,9 +1933,11 @@ void justify_text(bool whole_buffer)
}
#ifndef NANO_TINY
add_undo(PASTE, NULL);
/* Wipe an anchor on the first paragraph if it was only inherited. */
if (whole_buffer && !openfile->mark && !cutbuffer->has_anchor)
openfile->current->has_anchor = FALSE;
add_undo(PASTE, NULL);
#endif
/* Do the equivalent of a paste of the justified text. */
ingraft_buffer(cutbuffer);
@ -1954,13 +1956,8 @@ void justify_text(bool whole_buffer)
}
add_undo(COUPLE_END, N_("justification"));
#endif
/* We're done justifying. Restore the old cutbuffer. */
cutbuffer = was_cutbuffer;
/* Show what we justified on the status bar. */
#ifndef NANO_TINY
/* Report on the status bar what we justified. */
if (openfile->mark)
statusline(REMARK, _("Justified selection"));
else
@ -1970,6 +1967,9 @@ void justify_text(bool whole_buffer)
else
statusbar(_("Justified paragraph"));
/* We're done justifying. Restore the cutbuffer. */
cutbuffer = was_cutbuffer;
/* Set the desired screen column (always zero, except at EOF). */
openfile->placewewant = xplustabs();