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
Этот коммит содержится в:
родитель
454563c9dc
Коммит
1d06455ca5
@ -1,6 +1,8 @@
|
||||
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
|
||||
|
12
src/nano.c
12
src/nano.c
@ -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 */
|
||||
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user