From aea54276b6eed755ac5ab5ae5f7fe85987c0c21e Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Wed, 11 Jul 2018 10:48:27 +0200 Subject: [PATCH] tweaks: rename a function and place its call better --- src/prompt.c | 8 +++----- src/proto.h | 1 - 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/prompt.c b/src/prompt.c index 3ee95625..b98068b5 100644 --- a/src/prompt.c +++ b/src/prompt.c @@ -384,7 +384,7 @@ void reinit_statusbar_x(void) } /* Redraw the promptbar and place the cursor at the right spot. */ -void update_the_statusbar(void) +void draw_the_promptbar(void) { size_t base = strlenpt(prompt) + 2; size_t the_page, end_page, column; @@ -466,9 +466,9 @@ functionptrtype acquire_an_answer(int *actual, bool allow_tabs, if (statusbar_x > strlen(answer)) statusbar_x = strlen(answer); - update_the_statusbar(); - while (TRUE) { + draw_the_promptbar(); + kbinput = do_statusbar_input(&finished); #ifndef NANO_TINY @@ -571,8 +571,6 @@ functionptrtype acquire_an_answer(int *actual, bool allow_tabs, if (finished) break; - update_the_statusbar(); - #if defined(ENABLE_HISTORIES) && defined(ENABLE_TABCOMP) last_kbinput = kbinput; #endif diff --git a/src/proto.h b/src/proto.h index b957bcd2..b84122a2 100644 --- a/src/proto.h +++ b/src/proto.h @@ -463,7 +463,6 @@ void do_statusbar_verbatim_input(void); size_t statusbar_xplustabs(void); size_t get_statusbar_page_start(size_t start_col, size_t column); void reinit_statusbar_x(void); -void update_the_statusbar(void); void add_or_remove_pipe_symbol_from_answer(void); int do_prompt(bool allow_tabs, bool allow_files, int menu, const char *curranswer, filestruct **history_list,