nano

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

commit f7dee92189db840b92dd290fbe5326fba1e00ecb
parent d39698ff1fbb462416082b343b73c8e6581b9415
Author: Chris Allegretta <chrisa@asty.org>
Date:   Mon,  7 Jan 2002 16:43:25 +0000

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

Diffstat:
MChangeLog | 7+++++++
Mglobal.c | 4++--
Mnano.c | 3++-
3 files changed, 11 insertions(+), 3 deletions(-)

diff --git 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 @@ -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 @@ -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;