From 87460b59984dbd7f9c8aba0fd844d47a390e6be0 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Sun, 24 Jan 2016 21:02:09 +0000 Subject: [PATCH] Eliding another small function that is used only once. git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5588 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- ChangeLog | 1 + src/prompt.c | 15 ++++----------- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index b6418523..c495de5c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -8,6 +8,7 @@ * src/prompt.c (do_prompt): Remove a superfluous free. * src/prompt.c (update_the_bar): Bundle some statements. * src/prompt.c (need_statusbar_update): Elide this function. + * src/prompt.c (total_statusbar_refresh): Elide this function too. 2016-01-22 Benno Schulenberg * src/utils.c (get_homedir): Don't use $HOME when we're root, because diff --git a/src/prompt.c b/src/prompt.c index d4a07a5a..a49bb5b8 100644 --- a/src/prompt.c +++ b/src/prompt.c @@ -144,9 +144,10 @@ int do_statusbar_input(bool *ran_func, bool *finished, if (have_shortcut) { if (s->scfunc == do_tab || s->scfunc == do_enter) ; - else if (s->scfunc == total_refresh) - total_statusbar_refresh(refresh_func); - else if (s->scfunc == do_cut_text_void) { + else if (s->scfunc == total_refresh) { + total_redraw(); + refresh_func(); + } else if (s->scfunc == do_cut_text_void) { /* If we're using restricted mode, the filename * isn't blank, and we're at the "Write File" * prompt, disable Cut. */ @@ -659,14 +660,6 @@ void update_the_bar(void) update_statusbar_line(answer, statusbar_x); } -/* Unconditionally redraw the entire screen, and then refresh it using - * refresh_func(). */ -void total_statusbar_refresh(void (*refresh_func)(void)) -{ - total_redraw(); - refresh_func(); -} - /* Get a string of input at the statusbar prompt. This should only be * called from do_prompt(). */ functionptrtype get_prompt_string(int *actual, bool allow_tabs,