]> git.wh0rd.org Git - nano.git/commitdiff
Putting a common statement outside of the then/else branches.
authorBenno Schulenberg <bensberg@justemail.net>
Mon, 16 Jun 2014 12:40:14 +0000 (12:40 +0000)
committerBenno Schulenberg <bensberg@justemail.net>
Mon, 16 Jun 2014 12:40:14 +0000 (12:40 +0000)
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4969 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

ChangeLog
src/nano.c

index 37c8da5951bf9dedf2cef96aeea1de3f9035aebc..34ae19e090f9c717d76923217b2ce6ca34ca63a6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,6 +5,7 @@
        * src/nano.c (do_mouse, do_input): Don't bother returning zero when
        the cursor moved, just reset the cutbuffer directly.  This avoids an
        "Unknown Command" message on every cursor-positioning mouse click.
+       * src/nano.c (do_mouse): Put a common statement outside of then/else.
 
 2014-06-14  Mark Majeres  <mark@engine12.com>
        * src/nano.h, src/text.c (undo_cut, update_undo): When undoing a
index 50de0adc9d53d3984c03f77f311996b94939ecee..50c8b4b5096b4afd8a3675c02c53888565e75a3c 100644 (file)
@@ -1784,9 +1784,6 @@ int do_mouse(void)
                        mouse_x, (unsigned long)openfile->current_x);
 #endif
            }
-
-           openfile->placewewant = xplustabs();
-
        } else {
            /* Move to where the click occurred. */
            for (; openfile->current_y < mouse_y && openfile->current !=
@@ -1798,10 +1795,10 @@ int do_mouse(void)
 
            openfile->current_x = actual_x(openfile->current->data,
                get_page_start(xplustabs()) + mouse_x);
-
-           openfile->placewewant = xplustabs();
        }
 
+       openfile->placewewant = xplustabs();
+
 #ifndef NANO_TINY
        /* Clicking where the cursor is toggles the mark, as does
         * clicking beyond the line length with the cursor at the end of