tweaks: rename a function, to leave the old names behind

What the function does has changed, so better change the name too.
master
Benno Schulenberg 2020-05-31 16:41:07 +02:00
parent 19a124e806
commit 2a44cb2ed8
6 changed files with 16 additions and 16 deletions

View File

@ -153,8 +153,8 @@ char *do_browser(char *path)
#endif #endif
func = interpret(&kbinput); func = interpret(&kbinput);
if (func == total_refresh) { if (func == full_refresh) {
total_refresh(); full_refresh();
#ifndef NANO_TINY #ifndef NANO_TINY
/* Simulate a window resize to force a directory reread. */ /* Simulate a window resize to force a directory reread. */
kbinput = KEY_WINCH; kbinput = KEY_WINCH;

View File

@ -776,7 +776,7 @@ void shortcut_init(void)
#ifdef ENABLE_HELP #ifdef ENABLE_HELP
/* The description ("x") and blank_after (0) are irrelevant, /* The description ("x") and blank_after (0) are irrelevant,
* because the help viewer does not have a help text. */ * because the help viewer does not have a help text. */
add_to_funcs(total_refresh, MHELP, N_("Refresh"), "x", 0, VIEW); add_to_funcs(full_refresh, MHELP, N_("Refresh"), "x", 0, VIEW);
add_to_funcs(do_exit, MHELP, close_tag, "x", 0, VIEW); add_to_funcs(do_exit, MHELP, close_tag, "x", 0, VIEW);
#endif #endif
@ -855,7 +855,7 @@ void shortcut_init(void)
/* TRANSLATORS: Try to keep the next seven strings at most 10 characters. */ /* TRANSLATORS: Try to keep the next seven strings at most 10 characters. */
N_("Go To Dir"), WITHORSANS(gotodir_gist), TOGETHER, VIEW); N_("Go To Dir"), WITHORSANS(gotodir_gist), TOGETHER, VIEW);
add_to_funcs(total_refresh, MBROWSER, add_to_funcs(full_refresh, MBROWSER,
N_("Refresh"), WITHORSANS(browserrefresh_gist), BLANKAFTER, VIEW); N_("Refresh"), WITHORSANS(browserrefresh_gist), BLANKAFTER, VIEW);
add_to_funcs(do_search_forward, MBROWSER, add_to_funcs(do_search_forward, MBROWSER,
@ -885,7 +885,7 @@ void shortcut_init(void)
N_("Next"), WITHORSANS(findnext_gist), TOGETHER, VIEW); N_("Next"), WITHORSANS(findnext_gist), TOGETHER, VIEW);
add_to_funcs(do_search_backward, MMAIN|MHELP, add_to_funcs(do_search_backward, MMAIN|MHELP,
N_("Where Was"), WITHORSANS(wherewas_gist), BLANKAFTER, VIEW); N_("Where Was"), WITHORSANS(wherewas_gist), BLANKAFTER, VIEW);
add_to_funcs(total_refresh, MMAIN, add_to_funcs(full_refresh, MMAIN,
N_("Refresh"), WITHORSANS(refresh_gist), BLANKAFTER, VIEW); N_("Refresh"), WITHORSANS(refresh_gist), BLANKAFTER, VIEW);
#endif #endif
@ -998,7 +998,7 @@ void shortcut_init(void)
N_("Verbatim"), WITHORSANS(verbatim_gist), BLANKAFTER, NOVIEW); N_("Verbatim"), WITHORSANS(verbatim_gist), BLANKAFTER, NOVIEW);
#ifndef NANO_TINY #ifndef NANO_TINY
add_to_funcs(total_refresh, MMAIN, add_to_funcs(full_refresh, MMAIN,
N_("Refresh"), WITHORSANS(refresh_gist), TOGETHER, VIEW); N_("Refresh"), WITHORSANS(refresh_gist), TOGETHER, VIEW);
#endif #endif
@ -1336,9 +1336,9 @@ void shortcut_init(void)
add_to_sclist(MEXECUTE, "^J", 0, do_full_justify, 0); add_to_sclist(MEXECUTE, "^J", 0, do_full_justify, 0);
#endif #endif
if (!ISSET(PRESERVE)) if (!ISSET(PRESERVE))
add_to_sclist(MMAIN|MBROWSER|MHELP, "^L", 0, total_refresh, 0); add_to_sclist(MMAIN|MBROWSER|MHELP, "^L", 0, full_refresh, 0);
else else
add_to_sclist(MMAIN|MBROWSER, "^L", 0, total_refresh, 0); add_to_sclist(MMAIN|MBROWSER, "^L", 0, full_refresh, 0);
add_to_sclist(MMAIN|MEXECUTE, "^Z", 0, do_suspend_void, 0); add_to_sclist(MMAIN|MEXECUTE, "^Z", 0, do_suspend_void, 0);
#ifndef NANO_TINY #ifndef NANO_TINY

View File

@ -193,8 +193,8 @@ void show_help(void)
#endif #endif
func = interpret(&kbinput); func = interpret(&kbinput);
if (func == total_refresh) { if (func == full_refresh) {
total_refresh(); full_refresh();
} else if (ISSET(SHOW_CURSOR) && (func == do_left || func == do_right || } else if (ISSET(SHOW_CURSOR) && (func == do_left || func == do_right ||
func == do_up || func == do_down)) { func == do_up || func == do_down)) {
func(); func();

View File

@ -639,7 +639,7 @@ size_t actual_last_column(size_t leftedge, size_t column);
void edit_redraw(linestruct *old_current, update_type manner); void edit_redraw(linestruct *old_current, update_type manner);
void edit_refresh(void); void edit_refresh(void);
void adjust_viewport(update_type location); void adjust_viewport(update_type location);
void total_refresh(void); void full_refresh(void);
void draw_all_subwindows(void); void draw_all_subwindows(void);
void do_cursorpos(bool force); void do_cursorpos(bool force);
void do_cursorpos_void(void); void do_cursorpos_void(void);

View File

@ -384,7 +384,7 @@ keystruct *strtosc(const char *input)
else if (!strcmp(input, "backspace")) else if (!strcmp(input, "backspace"))
s->func = do_backspace; s->func = do_backspace;
else if (!strcmp(input, "refresh")) else if (!strcmp(input, "refresh"))
s->func = total_refresh; s->func = full_refresh;
else if (!strcmp(input, "suspend")) else if (!strcmp(input, "suspend"))
s->func = do_suspend_void; s->func = do_suspend_void;
else if (!strcmp(input, "casesens")) else if (!strcmp(input, "casesens"))

View File

@ -3308,8 +3308,8 @@ void adjust_viewport(update_type manner)
go_back_chunks(goal, &openfile->edittop, &openfile->firstcolumn); go_back_chunks(goal, &openfile->edittop, &openfile->firstcolumn);
} }
/* Unconditionally redraw the entire screen. */ /* Tell curses to unconditionally redraw whatever was on the screen. */
void total_refresh(void) void full_refresh(void)
{ {
#ifdef USE_SLANG #ifdef USE_SLANG
/* Slang curses emulation brain damage, part 4: Slang doesn't define /* Slang curses emulation brain damage, part 4: Slang doesn't define
@ -3321,8 +3321,8 @@ void total_refresh(void)
#endif #endif
} }
/* Redraw the entire screen, then refresh the title bar and the content of /* Draw all elements of the screen. That is: the title bar plus the content
* the edit window (when not in the file browser), and the bottom bars. */ * of the edit window (when not in the file browser), and the bottom bars. */
void draw_all_subwindows(void) void draw_all_subwindows(void)
{ {
if (currmenu != MBROWSER && currmenu != MWHEREISFILE && currmenu != MGOTODIR) if (currmenu != MBROWSER && currmenu != MWHEREISFILE && currmenu != MGOTODIR)