Commit 106c1bf3 authored by David Lawrence Ramsey's avatar David Lawrence Ramsey
Browse files

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-d3aeb78583b8
parent f70f67bd
Showing with 7 additions and 3 deletions
+7 -3
......@@ -98,8 +98,8 @@ CVS code -
do_scroll_down(), do_input(), do_search(), do_research(), and
do_delete(). (DLR)
- Ignore unhandled meta key sequences, function keys, and escape
sequences, and indicate it on the statusbar when we get an
unhandled shortcut or toggle, as Pico does. To get this to
sequences, indicate it on the statusbar, and beep when we get
an unhandled shortcut or toggle, as Pico does. To get this to
work properly, add a shortcut for moving to the next
search/replace string. New function is_ascii_cntrl_char();
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 ||
*func_key == TRUE) {
statusbar(_("Unknown Command"));
beep();
*meta_key = FALSE;
*func_key = FALSE;
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 (is_ascii_cntrl_char(input) || *meta_key == TRUE ||
*func_key == TRUE) {
beep();
*meta_key = FALSE;
*func_key = FALSE;
input = ERR;
......
......@@ -1158,8 +1158,10 @@ int parse_escape_seq_kbinput(int kbinput)
/* If the escape sequence is unrecognized and not ignored, throw it
* out, and indicate this on the statusbar. */
if (retval == ERR && !ignore_seq)
if (retval == ERR && !ignore_seq) {
statusbar(_("Unknown Command"));
beep();
}
free(seq);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment