1
1

more minor shortcut-related fixes

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2244 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
Этот коммит содержится в:
David Lawrence Ramsey 2005-01-08 06:16:19 +00:00
родитель 35e9713543
Коммит f4a799aaec
2 изменённых файлов: 16 добавлений и 6 удалений

Просмотреть файл

@ -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

Просмотреть файл

@ -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)
return TRUE;
} else if (s->metaval != NANO_NO_KEY) {
unget_kbinput(s->metaval, TRUE, FALSE);
return TRUE;
return TRUE;
}
}
return FALSE;
}
@ -1689,12 +1690,13 @@ 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 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, "^ ");