2014-06-13 Benno Schulenberg <bensberg@justemail.net>
* src/nano.c (do_input): Repositioning the cursor with the mouse
(result == 0) should break a series of ^Ks.
+ * src/nano.c (do_mouse): Clicking on the titlebar or the statusbar
+ should not break a series of ^Ks, thus result must not be zero.
2014-06-11 Benno Schulenberg <bensberg@justemail.net>
* src/winio.c (get_mouseinput): Produce the correct return value for
int mouse_x, mouse_y;
int retval = get_mouseinput(&mouse_x, &mouse_y, TRUE);
+ if (retval != 0)
+ /* The click is wrong or already handled. */
+ return retval;
+
/* We can click on the edit window to move the cursor. */
- if (retval == 0 && wmouse_trafo(edit, &mouse_y, &mouse_x, FALSE)) {
+ if (wmouse_trafo(edit, &mouse_y, &mouse_x, FALSE)) {
bool sameline;
/* Did they click on the line with the cursor? If they
* clicked on the cursor, we set the mark. */
#endif
edit_redraw(current_save, pww_save);
+
+ /* The click influenced the cursor. */
+ return 0;
}
- return retval;
+ /* The click was elsewhere, ignore it. */
+ return 2;
}
#endif /* !DISABLE_MOUSE */