diff --git a/ChangeLog b/ChangeLog index 5ed99bdb4f46b4c5e98c51264d9e14f2bbf5dd3e..0ef3d6f0f3ac47104d964b86fcd56f7baadf73c7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,8 @@ stop passing it around. * src/help.c (help_init), src/winio.c (bottombars): There are no tagless functions, so there is no need to check. + * src/prompt.c (do_prompt, get_prompt_string): Don't pass the + menu, just set it earlier. 2014-06-30 Mark Majeres <mark@engine12.com> * src/cut.c, src/global.c, src/nano.c: Rename 'cut_till_end' to diff --git a/src/prompt.c b/src/prompt.c index 66031a11c38472c4df5a80f31c9e2503a311f610..6aa539edb3ebe40e145574502a6845325f67d2c5 100644 --- a/src/prompt.c +++ b/src/prompt.c @@ -729,7 +729,7 @@ const sc *get_prompt_string(int *actual, bool allow_tabs, #ifndef DISABLE_HISTORIES filestruct **history_list, #endif - void (*refresh_func)(void), int menu + void (*refresh_func)(void) #ifndef DISABLE_TABCOMP , bool *list #endif @@ -779,8 +779,6 @@ const sc *get_prompt_string(int *actual, bool allow_tabs, statusbar_pww = statusbar_xplustabs(); } - currmenu = menu; - #ifdef DEBUG fprintf(stderr, "get_prompt_string: answer = \"%s\", statusbar_x = %lu\n", answer, (unsigned long) statusbar_x); #endif @@ -979,6 +977,7 @@ int do_prompt(bool allow_tabs, prompt = charalloc(((COLS - 4) * mb_cur_max()) + 1); + currmenu = menu; bottombars(menu); va_start(ap, msg); @@ -994,7 +993,7 @@ int do_prompt(bool allow_tabs, #ifndef DISABLE_HISTORIES history_list, #endif - refresh_func, menu + refresh_func #ifndef DISABLE_TABCOMP , &list #endif diff --git a/src/proto.h b/src/proto.h index dcc634fe358cb9ce6e32a9bd4b9f0ad58ad46a23..4ee11eccf87a70bf3020cfba20ef4bc25ad50997 100644 --- a/src/proto.h +++ b/src/proto.h @@ -530,7 +530,7 @@ const sc *get_prompt_string(int *value, bool allow_tabs, #ifndef DISABLE_HISTORIES filestruct **history_list, #endif - void (*refresh_func)(void), int menu + void (*refresh_func)(void) #ifndef DISABLE_TABCOMP , bool *list #endif