tweaks: set a boolean directly, instead of using a function call

master
Benno Schulenberg 2019-04-28 10:40:37 +02:00
parent 3fe17e0355
commit b9dd572a67
1 changed files with 4 additions and 11 deletions

View File

@ -398,19 +398,12 @@ void ingraft_buffer(linestruct *somebuffer)
bool edittop_inside; bool edittop_inside;
#ifndef NANO_TINY #ifndef NANO_TINY
bool right_side_up = FALSE, single_line = FALSE; bool right_side_up = FALSE, single_line = FALSE;
#endif
#ifndef NANO_TINY /* Remember whether mark and cursor are on the same line, and their order. */
/* Keep track of whether the mark begins inside the partition and
* will need adjustment. */
if (openfile->mark) { if (openfile->mark) {
linestruct *top, *bot; single_line = (openfile->mark == openfile->current);
size_t top_x, bot_x; right_side_up = (openfile->mark->lineno < openfile->current->lineno ||
(single_line && openfile->mark_x < openfile->current_x));
mark_order((const linestruct **)&top, &top_x,
(const linestruct **)&bot, &bot_x, &right_side_up);
single_line = (top == bot);
} }
#endif #endif