in get_mouseinput(), make clicking on meta shortcuts work properly
again, and properly handle the case of whereis_list's being longer than MAIN_VISIBLE as bottombars() does git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1913 35c25a1d-7b9e-4130-9fde-d3aeb78583b8master
parent
a16b27f102
commit
fe0d366ce2
|
@ -23,6 +23,11 @@ CVS code -
|
||||||
- New function used as a wrapper for ungetch(). (DLR)
|
- New function used as a wrapper for ungetch(). (DLR)
|
||||||
get_mouseinput()
|
get_mouseinput()
|
||||||
- Consolidate two if statements to increase efficiency. (DLR)
|
- Consolidate two if statements to increase efficiency. (DLR)
|
||||||
|
- Check kbinput against metaval instead of (erroneously) ctrlval
|
||||||
|
when putting back a meta sequence. (DLR)
|
||||||
|
- If there are more than MAIN_VISIBLE shortcuts available, only
|
||||||
|
register clicks on the first MAIN_VISIBLE shortcuts, since
|
||||||
|
bottombars() only shows that many shortcuts. (DLR)
|
||||||
do_yesno()
|
do_yesno()
|
||||||
- Don't bother assigning the value of get_mouseinput() to
|
- Don't bother assigning the value of get_mouseinput() to
|
||||||
anything. Since allow_shortcuts is FALSE, its return value
|
anything. Since allow_shortcuts is FALSE, its return value
|
||||||
|
|
10
src/winio.c
10
src/winio.c
|
@ -1287,9 +1287,15 @@ bool get_mouseinput(int *mouse_x, int *mouse_y, bool allow_shortcuts)
|
||||||
/* Get the shortcut lists' length. */
|
/* Get the shortcut lists' length. */
|
||||||
if (currshortcut == main_list)
|
if (currshortcut == main_list)
|
||||||
currslen = MAIN_VISIBLE;
|
currslen = MAIN_VISIBLE;
|
||||||
else
|
else {
|
||||||
currslen = length_of_list(currshortcut);
|
currslen = length_of_list(currshortcut);
|
||||||
|
|
||||||
|
/* We don't show any more shortcuts than the main list
|
||||||
|
* does. */
|
||||||
|
if (currslen > MAIN_VISIBLE)
|
||||||
|
currslen = MAIN_VISIBLE;
|
||||||
|
}
|
||||||
|
|
||||||
/* Calculate the width of each shortcut in the list (it's the
|
/* Calculate the width of each shortcut in the list (it's the
|
||||||
* same for all of them). */
|
* same for all of them). */
|
||||||
if (currslen < 2)
|
if (currslen < 2)
|
||||||
|
@ -1319,7 +1325,7 @@ bool get_mouseinput(int *mouse_x, int *mouse_y, bool allow_shortcuts)
|
||||||
* has an equivalent control key, meta key sequence, or both. */
|
* has an equivalent control key, meta key sequence, or both. */
|
||||||
if (s->ctrlval != NANO_NO_KEY)
|
if (s->ctrlval != NANO_NO_KEY)
|
||||||
unget_kbinput(s->ctrlval, FALSE);
|
unget_kbinput(s->ctrlval, FALSE);
|
||||||
else if (s->ctrlval != NANO_NO_KEY)
|
else if (s->metaval != NANO_NO_KEY)
|
||||||
unget_kbinput(s->metaval, TRUE);
|
unget_kbinput(s->metaval, TRUE);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
Loading…
Reference in New Issue