tweaks: set a boolean directly, instead of using a function call
Этот коммит содержится в:
родитель
22fc16b2d0
Коммит
2669d3623d
11
src/text.c
11
src/text.c
@ -2591,19 +2591,16 @@ const char *do_alt_speller(char *tempfile_name)
|
|||||||
#ifndef NANO_TINY
|
#ifndef NANO_TINY
|
||||||
/* Replace the marked text (or entire text) with the corrected text. */
|
/* Replace the marked text (or entire text) with the corrected text. */
|
||||||
if (openfile->mark) {
|
if (openfile->mark) {
|
||||||
linestruct *top, *bot;
|
bool upright = (openfile->mark->lineno < openfile->current->lineno ||
|
||||||
size_t top_x, bot_x;
|
(openfile->mark == openfile->current &&
|
||||||
bool right_side_up;
|
openfile->mark_x < openfile->current_x));
|
||||||
ssize_t was_mark_lineno = openfile->mark->lineno;
|
ssize_t was_mark_lineno = openfile->mark->lineno;
|
||||||
|
|
||||||
get_region((const linestruct **)&top, &top_x,
|
|
||||||
(const linestruct **)&bot, &bot_x, &right_side_up);
|
|
||||||
|
|
||||||
replace_marked_buffer(tempfile_name);
|
replace_marked_buffer(tempfile_name);
|
||||||
|
|
||||||
/* Adjust the end point of the marked region for any change in
|
/* Adjust the end point of the marked region for any change in
|
||||||
* length of the region's last line. */
|
* length of the region's last line. */
|
||||||
if (right_side_up)
|
if (upright)
|
||||||
current_x_save = openfile->current_x;
|
current_x_save = openfile->current_x;
|
||||||
else
|
else
|
||||||
openfile->mark_x = openfile->current_x;
|
openfile->mark_x = openfile->current_x;
|
||||||
|
Загрузка…
Ссылка в новой задаче
Block a user