mirror of
git://git.sv.gnu.org/nano.git
synced 2024-11-30 00:23:28 +03:00
tweaks: rename a variable, to match another with the same meaning
Also, remove a redundant condition.
This commit is contained in:
parent
7c08e8ea69
commit
b503670750
@ -393,13 +393,14 @@ void ingraft_buffer(linestruct *somebuffer)
|
|||||||
size_t current_x_save = openfile->current_x;
|
size_t current_x_save = openfile->current_x;
|
||||||
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;
|
||||||
|
bool same_line = FALSE;
|
||||||
|
|
||||||
/* Remember whether mark and cursor are on the same line, and their order. */
|
/* Remember whether mark and cursor are on the same line, and their order. */
|
||||||
if (openfile->mark) {
|
if (openfile->mark) {
|
||||||
single_line = (openfile->mark == openfile->current);
|
same_line = (openfile->mark == openfile->current);
|
||||||
right_side_up = (openfile->mark->lineno < openfile->current->lineno ||
|
right_side_up = (openfile->mark->lineno < openfile->current->lineno ||
|
||||||
(single_line && openfile->mark_x < openfile->current_x));
|
(same_line && openfile->mark_x < openfile->current_x));
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -429,7 +430,7 @@ void ingraft_buffer(linestruct *somebuffer)
|
|||||||
#ifndef NANO_TINY
|
#ifndef NANO_TINY
|
||||||
/* When needed, refresh the mark's pointer and compensate the mark's
|
/* When needed, refresh the mark's pointer and compensate the mark's
|
||||||
* x coordinate for the change in the current line. */
|
* x coordinate for the change in the current line. */
|
||||||
if (openfile->mark && single_line) {
|
if (same_line) {
|
||||||
if (!right_side_up) {
|
if (!right_side_up) {
|
||||||
openfile->mark = openfile->filebot;
|
openfile->mark = openfile->filebot;
|
||||||
openfile->mark_x += openfile->current_x - current_x_save;
|
openfile->mark_x += openfile->current_x - current_x_save;
|
||||||
|
Loading…
Reference in New Issue
Block a user