tweaks: elide an unneeded variable
Storing the orientation of the marked region beforehand is not needed, as this orientation is readily available also after the justification. (By the way, cursor and mark need to be swapped after justifying a backward-marked region because the rule is that the cursor gets placed *after* the justified paragraph. Maybe that should change?)master
parent
b60fec5db3
commit
0f8423eb4c
|
@ -1761,8 +1761,6 @@ void do_justify(bool full_justify)
|
|||
linestruct *jusline;
|
||||
/* The line that we're justifying in the current cutbuffer. */
|
||||
#ifndef NANO_TINY
|
||||
bool right_side_up = (openfile->mark && mark_is_before_cursor());
|
||||
/* Whether the mark (if any) is before the cursor. */
|
||||
bool before_eol = FALSE;
|
||||
/* Whether the end of a marked region is before the end of its line. */
|
||||
char *primary_lead = NULL;
|
||||
|
@ -1980,7 +1978,7 @@ void do_justify(bool full_justify)
|
|||
update_undo(PASTE);
|
||||
|
||||
/* After justifying a backward-marked text, swap mark and cursor. */
|
||||
if (openfile->mark && !right_side_up) {
|
||||
if (openfile->mark && !mark_is_before_cursor()) {
|
||||
linestruct *bottom = openfile->current;
|
||||
size_t bottom_x = openfile->current_x;
|
||||
|
||||
|
|
Loading…
Reference in New Issue