Commit 0ec77100 authored by Benno Schulenberg's avatar Benno Schulenberg
Browse files

Putting a common statement outside of the then/else branches.

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4969 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
parent 99a649dd
Showing with 3 additions and 5 deletions
+3 -5
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
* src/nano.c (do_mouse, do_input): Don't bother returning zero when * src/nano.c (do_mouse, do_input): Don't bother returning zero when
the cursor moved, just reset the cutbuffer directly. This avoids an the cursor moved, just reset the cutbuffer directly. This avoids an
"Unknown Command" message on every cursor-positioning mouse click. "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> 2014-06-14 Mark Majeres <mark@engine12.com>
* src/nano.h, src/text.c (undo_cut, update_undo): When undoing a * src/nano.h, src/text.c (undo_cut, update_undo): When undoing a
......
...@@ -1784,9 +1784,6 @@ int do_mouse(void) ...@@ -1784,9 +1784,6 @@ int do_mouse(void)
mouse_x, (unsigned long)openfile->current_x); mouse_x, (unsigned long)openfile->current_x);
#endif #endif
} }
openfile->placewewant = xplustabs();
} else { } else {
/* Move to where the click occurred. */ /* Move to where the click occurred. */
for (; openfile->current_y < mouse_y && openfile->current != for (; openfile->current_y < mouse_y && openfile->current !=
...@@ -1798,10 +1795,10 @@ int do_mouse(void) ...@@ -1798,10 +1795,10 @@ int do_mouse(void)
openfile->current_x = actual_x(openfile->current->data, openfile->current_x = actual_x(openfile->current->data,
get_page_start(xplustabs()) + mouse_x); get_page_start(xplustabs()) + mouse_x);
openfile->placewewant = xplustabs();
} }
openfile->placewewant = xplustabs();
#ifndef NANO_TINY #ifndef NANO_TINY
/* Clicking where the cursor is toggles the mark, as does /* Clicking where the cursor is toggles the mark, as does
* clicking beyond the line length with the cursor at the end of * clicking beyond the line length with the cursor at the end of
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment