]> git.wh0rd.org Git - nano.git/commitdiff
Renaming two variables for clarity.
authorBenno Schulenberg <bensberg@justemail.net>
Tue, 1 Dec 2015 11:43:13 +0000 (11:43 +0000)
committerBenno Schulenberg <bensberg@justemail.net>
Tue, 1 Dec 2015 11:43:13 +0000 (11:43 +0000)
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5459 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

ChangeLog
src/files.c

index 3f20969c6b4b9827b1f3db821c7ee817e781182d..f5c484540b52a9a77a682785f58829e5f3bb1b3a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,7 @@
 2015-12-01  Benno Schulenberg  <bensberg@justemail.net>
        * 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  <bensberg@justemail.net>
        * src/text.c (redo_cut, update_undo): When cutting reaches the EOF,
index 08b86e1681cf38fb25e4e1f8a04a65099b1bfb14..354be51191f9f39585023177bf39718a61569a54 100644 (file)
@@ -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. */