From: Chris Allegretta Date: Mon, 7 Jan 2002 16:43:25 +0000 (+0000) Subject: main() alt val - 32 check fix, and shortcut_init() fix in global.c for hard coded... X-Git-Tag: v1.1.6~44 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=f7dee92189db840b92dd290fbe5326fba1e00ecb;p=nano.git main() alt val - 32 check fix, and shortcut_init() fix in global.c for hard coded values git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@986 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- diff --git a/ChangeLog b/ChangeLog index 297f5f07..49406db1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,13 @@ CVS code - - nano.c: usage() - Remove extra \n in --keypad description (Jordi). + main() + - Check that alt value is an alpha char before comparing to + val - 32, fixes Alt-R calling doprev instead of replace. +- global.c: + shorcut_init() + - Replace hard coded ALT_G and ALT_H values in the replace + and goto shortcuts with their macro counterparts NANO_ALT_*_KEY. - winio.c: edit_refresh() - Rename lines to nlines to fix AIX breakage (reported by diff --git a/global.c b/global.c index 622a9332..09b844e8 100644 --- a/global.c +++ b/global.c @@ -352,7 +352,7 @@ void shortcut_init(int unjustify) else sc_init_one(&main_list[4], NANO_REPLACE_KEY, _("Replace"), nano_replace_msg, - NANO_ALT_R, NANO_REPLACE_FKEY, 0, NOVIEW, do_replace); + NANO_ALT_REPLACE_KEY, NANO_REPLACE_FKEY, 0, NOVIEW, do_replace); sc_init_one(&main_list[5], NANO_WHEREIS_KEY, _("Where Is"), nano_whereis_msg, @@ -435,7 +435,7 @@ void shortcut_init(int unjustify) sc_init_one(&main_list[25], NANO_GOTO_KEY, _("Goto Line"), nano_goto_msg, - NANO_ALT_G, NANO_GOTO_FKEY, 0, VIEW, do_gotoline_void); + NANO_ALT_GOTO_KEY, NANO_GOTO_FKEY, 0, VIEW, do_gotoline_void); #if (!defined NANO_SMALL) && (defined HAVE_REGEX_H) sc_init_one(&main_list[26], -9, _("Find Other Bracket"), diff --git a/nano.c b/nano.c index 5761f78d..a382dd82 100644 --- a/nano.c +++ b/nano.c @@ -3173,7 +3173,8 @@ int main(int argc, char *argv[]) /* And for toggle switches */ for (i = 0; i <= TOGGLE_LEN - 1 && !keyhandled; i++) if (kbinput == toggles[i].val || - kbinput == toggles[i].val - 32) { + (toggles[i].val > 'a' && + kbinput == toggles[i].val - 32)) { do_toggle(i); keyhandled = 1; break;