nano

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

commit 653d6144390e9579ccb51417ac514978a47661da
parent 13f094e80e46cec4ff4367562d809fe2703753a2
Author: Chris Allegretta <chrisa@asty.org>
Date:   Mon,  4 Aug 2003 02:12:03 +0000

Use DLR's home/end patch instead of mine, because it's cleaner and remove some unneeded code in do_help()


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1510 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

Diffstat:
MChangeLog | 7+++++--
Mwinio.c | 10+++-------
2 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/ChangeLog b/ChangeLog @@ -9,13 +9,16 @@ CVS code - - Tweak to avoid a potential problem when strp is non-NULL but *strp is NULL. (David Benbennick) - winio.c: + do_help() + - Get rid of keypad_on() call for bottomwin, which should not be + needed (DLR). nanogetstr() - Fix problem with search history where a temporary string added at the bottom of the history (but which was not in the history) would not be preserved after scrolling down to the blank bottom entry and then scrolling back up. (DLR) - - Add handler for Alt-[-H and F as home and end when -K is - used. Basically a workaround until a cleaner way can be found. + - Handle Alt-[-F and H (DLR, fixed home and end not working with + -K in statusbar). - configure.ac: - Change the program used to detect a broken regexec() function so that it works properly, using information found at diff --git a/winio.c b/winio.c @@ -294,12 +294,10 @@ int nanogetstr(int allowtabs, const char *buf, const char *def, #endif case NANO_HOME_KEY: case KEY_HOME: - do_home: x = 0; break; case NANO_END_KEY: case KEY_END: - do_end: x = xend; break; case KEY_RIGHT: @@ -488,10 +486,10 @@ int nanogetstr(int allowtabs, const char *buf, const char *def, x--; break; case 'F': - goto do_end; + x = xend; break; case 'H': - goto do_home; + x = 0; break; case '1': case '7': @@ -1545,7 +1543,7 @@ int line_len(const char *ptr) int do_help(void) { #ifndef DISABLE_HELP - int i, page = 0, kbinput = 0, no_more = 0, kp, kp2; + int i, page = 0, kbinput = 0, no_more = 0, kp; int no_help_flag = 0; const shortcut *oldshortcut; @@ -1563,7 +1561,6 @@ int do_help(void) currshortcut = help_list; kp = keypad_on(edit, 1); - kp2 = keypad_on(bottomwin, 1); if (ISSET(NO_HELP)) { @@ -1665,7 +1662,6 @@ int do_help(void) curs_set(1); edit_refresh(); kp = keypad_on(edit, kp); - kp2 = keypad_on(bottomwin, kp2); /* The help_init() at the beginning allocated help_text, which has now been written to screen. */