nano

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

commit eedec06cc4bc3f62ceebc337facad47c9afaa2ef
parent cdcd365d34f96aaad8d3a7de3c087fc9fa2781b0
Author: Benno Schulenberg <bensberg@justemail.net>
Date:   Tue, 17 May 2016 12:48:47 +0200

tweaks: fix compilation when configured with --enable-tiny --enable-browser

Diffstat:
Msrc/browser.c | 6++++++
Msrc/global.c | 3++-
2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/browser.c b/src/browser.c @@ -171,12 +171,16 @@ char *do_browser(char *path, DIR *dir) if (func == total_refresh) { total_redraw(); /* Simulate a window resize to force a directory reread. */ +#ifndef NANO_TINY kbinput = KEY_WINCH; +#endif } else if (func == do_help_void) { #ifndef DISABLE_HELP do_help_void(); /* The window dimensions might have changed, so act as if. */ +#ifndef NANO_TINY kbinput = KEY_WINCH; +#endif #else say_there_is_no_help(); #endif @@ -269,12 +273,14 @@ char *do_browser(char *path, DIR *dir) } else if (func == do_down_void) { if (selected + width <= filelist_len - 1) selected += width; +#ifndef NANO_TINY } else if (func == do_prev_word_void) { selected -= (selected % width); } else if (func == do_next_word_void) { selected += width - 1 - (selected % width); if (selected >= filelist_len) selected = filelist_len - 1; +#endif } else if (func == do_left) { if (selected > 0) selected--; diff --git a/src/global.c b/src/global.c @@ -1025,12 +1025,13 @@ void shortcut_init(void) #ifndef DISABLE_BROWSER add_to_funcs(total_refresh, MBROWSER, refresh_tag, IFSCHELP(nano_browser_refresh_msg), BLANKAFTER, VIEW); - +#ifndef NANO_TINY add_to_funcs(do_prev_word_void, MBROWSER, N_("Left Column"), IFSCHELP(nano_browser_lefthand_msg), TOGETHER, VIEW); add_to_funcs(do_next_word_void, MBROWSER, N_("Right Column"), IFSCHELP(nano_browser_righthand_msg), BLANKAFTER, VIEW); #endif +#endif #ifndef DISABLE_COLOR add_to_funcs(do_page_up, MLINTER,