nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit 106c1bf3d102d0140db680ee76b7d5eb79e0c2ec
parent f70f67bd109980717c031454469bd06fa7809897
Author: David Lawrence Ramsey <pooka109@gmail.com>
Date:   Sat,  3 Jun 2006 19:36:02 +0000

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

Diffstat:
MChangeLog | 4++--
Msrc/nano.c | 1+
Msrc/prompt.c | 1+
Msrc/winio.c | 4+++-
4 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog @@ -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(), diff --git a/src/nano.c b/src/nano.c @@ -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; diff --git a/src/prompt.c b/src/prompt.c @@ -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; diff --git a/src/winio.c b/src/winio.c @@ -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);