Commit 1d06455c authored by Benno Schulenberg's avatar Benno Schulenberg
Browse files

Letting a click on titlebar or statusbar not break a series of ^Ks.

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4961 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
No related merge requests found
Showing with 12 additions and 2 deletions
+12 -2
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
......
......@@ -1737,8 +1737,12 @@ int do_mouse(void)
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. */
......@@ -1812,9 +1816,13 @@ int do_mouse(void)
#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 */
......
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