From: Benno Schulenberg Date: Tue, 1 Dec 2015 11:43:13 +0000 (+0000) Subject: Renaming two variables for clarity. X-Git-Tag: v2.5.0~24 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=4ea55c3bf7e681d1428700e27ef6c7b3bb530a62;p=nano.git Renaming two variables for clarity. git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5459 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- diff --git a/ChangeLog b/ChangeLog index 3f20969c..f5c48454 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,7 @@ 2015-12-01 Benno Schulenberg * src/files.c (do_insertfile): Mark the buffer as mofified only when actually something was inserted. This fixes Savannah bug #45409. + * src/files.c (do_insertfile): Rename two variables for clarity. 2015-11-30 Benno Schulenberg * src/text.c (redo_cut, update_undo): When cutting reaches the EOF, diff --git a/src/files.c b/src/files.c index 08b86e16..354be511 100644 --- a/src/files.c +++ b/src/files.c @@ -1042,8 +1042,8 @@ void do_insertfile( /* The last answer the user typed at the statusbar prompt. */ filestruct *edittop_save = openfile->edittop; ssize_t was_current_lineno = openfile->current->lineno; - size_t current_x_save = openfile->current_x; - ssize_t current_y_save = openfile->current_y; + size_t was_current_x = openfile->current_x; + ssize_t was_current_y = openfile->current_y; bool edittop_inside = FALSE; #ifndef NANO_TINY bool right_side_up = FALSE, single_line = FALSE; @@ -1247,14 +1247,14 @@ void do_insertfile( openfile->mark_begin_x += openfile->current_x; } #endif - openfile->current_x += current_x_save; + openfile->current_x += was_current_x; } #ifndef NANO_TINY else if (openfile->mark_set) { if (!right_side_up) { if (single_line) { openfile->mark_begin = openfile->current; - openfile->mark_begin_x -= current_x_save; + openfile->mark_begin_x -= was_current_x; } else openfile->mark_begin_x -= openfile->current_x; } @@ -1263,7 +1263,7 @@ void do_insertfile( /* Update the current y-coordinate to account for the * number of lines inserted. */ - openfile->current_y += current_y_save; + openfile->current_y += was_current_y; /* Unpartition the filestruct so that it contains all * the text again. Note that we've replaced the @@ -1283,7 +1283,7 @@ void do_insertfile( /* Mark the file as modified if it changed. */ if (openfile->current->lineno != was_current_lineno || - openfile->current_x != current_x_save) + openfile->current_x != was_current_x) set_modified(); /* Update the screen. */