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

master
Benno Schulenberg 2016-05-17 12:48:47 +02:00
parent cdcd365d34
commit eedec06cc4
2 changed files with 8 additions and 1 deletions

View File

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

View File

@ -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,