more minor shortcut-related fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2244 35c25a1d-7b9e-4130-9fde-d3aeb78583b8master
parent
35e9713543
commit
f4a799aaec
|
@ -182,13 +182,21 @@ CVS code -
|
|||
- Remove v_first parameter, and go back to the old behavior of
|
||||
putting back the first character of the escape sequence, as it
|
||||
worked just as well and was less complicated. (DLR)
|
||||
get_mouseinput()
|
||||
- Return TRUE instead of FALSE only when we have a control key,
|
||||
a prinary meta key sequence, or both. (DLR)
|
||||
get_shortcut()
|
||||
- Add a debug message. (DLR)
|
||||
- Take kbinput as a reference instead of a value, so that it's
|
||||
translated when the key is translated to its equivalent
|
||||
control key or meta key shortcut. (DLR)
|
||||
- Return s instead of NULL only when we have a control key, a
|
||||
prinary meta key sequence, or both. (DLR)
|
||||
get_toggle()
|
||||
- Add a debug message. (DLR)
|
||||
bottombars()
|
||||
- Initialize foo, in case a keystroke meets none of the handled
|
||||
cases. (DLR)
|
||||
- configure.ac:
|
||||
- Remove specific references to control key shortcuts. (DLR)
|
||||
- Check for the wide version of ncurses, without which multibyte
|
||||
|
|
14
src/winio.c
14
src/winio.c
|
@ -1639,12 +1639,13 @@ bool get_mouseinput(int *mouse_x, int *mouse_y, bool allow_shortcuts)
|
|||
/* And put back the equivalent key. Assume that each shortcut
|
||||
* has, at the very least, an equivalent control key, an
|
||||
* equivalent primary meta key sequence, or both. */
|
||||
if (s->ctrlval != NANO_NO_KEY)
|
||||
if (s->ctrlval != NANO_NO_KEY) {
|
||||
unget_kbinput(s->ctrlval, FALSE, FALSE);
|
||||
else if (s->metaval != NANO_NO_KEY)
|
||||
unget_kbinput(s->metaval, TRUE, FALSE);
|
||||
|
||||
return TRUE;
|
||||
} else if (s->metaval != NANO_NO_KEY) {
|
||||
unget_kbinput(s->metaval, TRUE, FALSE);
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -1689,13 +1690,14 @@ const shortcut *get_shortcut(const shortcut *s_list, int *kbinput, bool
|
|||
*meta_key = FALSE;
|
||||
*func_key = FALSE;
|
||||
*kbinput = s->ctrlval;
|
||||
return s;
|
||||
} else if (s->metaval != NANO_NO_KEY) {
|
||||
*meta_key = TRUE;
|
||||
*func_key = FALSE;
|
||||
*kbinput = s->metaval;
|
||||
}
|
||||
return s;
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
@ -3020,7 +3022,7 @@ void bottombars(const shortcut *s)
|
|||
keystr = _("Up");
|
||||
else {
|
||||
#endif
|
||||
char foo[4];
|
||||
char foo[4] = "";
|
||||
|
||||
if (s->ctrlval == NANO_CONTROL_SPACE)
|
||||
strcpy(foo, "^ ");
|
||||
|
|
Loading…
Reference in New Issue