beep when we get an unhandled shortcut or toggle, as Pico does
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3616 35c25a1d-7b9e-4130-9fde-d3aeb78583b8master
parent
f70f67bd10
commit
106c1bf3d1
|
@ -98,8 +98,8 @@ CVS code -
|
||||||
do_scroll_down(), do_input(), do_search(), do_research(), and
|
do_scroll_down(), do_input(), do_search(), do_research(), and
|
||||||
do_delete(). (DLR)
|
do_delete(). (DLR)
|
||||||
- Ignore unhandled meta key sequences, function keys, and escape
|
- Ignore unhandled meta key sequences, function keys, and escape
|
||||||
sequences, and indicate it on the statusbar when we get an
|
sequences, indicate it on the statusbar, and beep when we get
|
||||||
unhandled shortcut or toggle, as Pico does. To get this to
|
an unhandled shortcut or toggle, as Pico does. To get this to
|
||||||
work properly, add a shortcut for moving to the next
|
work properly, add a shortcut for moving to the next
|
||||||
search/replace string. New function is_ascii_cntrl_char();
|
search/replace string. New function is_ascii_cntrl_char();
|
||||||
changes to shortcut_init(), do_input(), do_statusbar_input(),
|
changes to shortcut_init(), do_input(), do_statusbar_input(),
|
||||||
|
|
|
@ -1311,6 +1311,7 @@ int do_input(bool *meta_key, bool *func_key, bool *s_or_t, bool
|
||||||
if (is_ascii_cntrl_char(input) || *meta_key == TRUE ||
|
if (is_ascii_cntrl_char(input) || *meta_key == TRUE ||
|
||||||
*func_key == TRUE) {
|
*func_key == TRUE) {
|
||||||
statusbar(_("Unknown Command"));
|
statusbar(_("Unknown Command"));
|
||||||
|
beep();
|
||||||
*meta_key = FALSE;
|
*meta_key = FALSE;
|
||||||
*func_key = FALSE;
|
*func_key = FALSE;
|
||||||
input = ERR;
|
input = ERR;
|
||||||
|
|
|
@ -111,6 +111,7 @@ int do_statusbar_input(bool *meta_key, bool *func_key, bool *s_or_t,
|
||||||
if (*s_or_t == FALSE) {
|
if (*s_or_t == FALSE) {
|
||||||
if (is_ascii_cntrl_char(input) || *meta_key == TRUE ||
|
if (is_ascii_cntrl_char(input) || *meta_key == TRUE ||
|
||||||
*func_key == TRUE) {
|
*func_key == TRUE) {
|
||||||
|
beep();
|
||||||
*meta_key = FALSE;
|
*meta_key = FALSE;
|
||||||
*func_key = FALSE;
|
*func_key = FALSE;
|
||||||
input = ERR;
|
input = ERR;
|
||||||
|
|
|
@ -1158,8 +1158,10 @@ int parse_escape_seq_kbinput(int kbinput)
|
||||||
|
|
||||||
/* If the escape sequence is unrecognized and not ignored, throw it
|
/* If the escape sequence is unrecognized and not ignored, throw it
|
||||||
* out, and indicate this on the statusbar. */
|
* out, and indicate this on the statusbar. */
|
||||||
if (retval == ERR && !ignore_seq)
|
if (retval == ERR && !ignore_seq) {
|
||||||
statusbar(_("Unknown Command"));
|
statusbar(_("Unknown Command"));
|
||||||
|
beep();
|
||||||
|
}
|
||||||
|
|
||||||
free(seq);
|
free(seq);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue