Renaming 'update_bar_if_needed()' for more contrast and aptness.

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5612 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
master
Benno Schulenberg 2016-02-06 11:44:33 +00:00
parent d844f05a1e
commit 2cfa96bde9
3 changed files with 10 additions and 9 deletions

View File

@ -7,6 +7,7 @@
when writing in the status bar, and on when waiting for input.
* src/prompt.c (update_the_statusbar): Chop two parameters that are
always the same, and that are global variables anyway.
* src/prompt.c (update_bar_if_needed): Rename this for more contrast.
2016-02-05 Benno Schulenberg <bensberg@justemail.net>
* doc/texinfo/nano.texi: Condense the descriptions of command-key

View File

@ -244,7 +244,7 @@ int do_statusbar_mouse(void)
statusbar_x = actual_x(answer,
get_statusbar_page_start(start_col, start_col +
statusbar_xplustabs()) + mouse_x - start_col);
update_the_bar();
update_bar_if_needed();
}
}
@ -323,14 +323,14 @@ void do_statusbar_output(char *output, size_t output_len, bool
void do_statusbar_home(void)
{
statusbar_x = 0;
update_the_bar();
update_bar_if_needed();
}
/* Move to the end of the prompt text. */
void do_statusbar_end(void)
{
statusbar_x = strlen(answer);
update_the_bar();
update_bar_if_needed();
}
/* Move left one character. */
@ -338,7 +338,7 @@ void do_statusbar_left(void)
{
if (statusbar_x > 0) {
statusbar_x = move_mbleft(answer, statusbar_x);
update_the_bar();
update_bar_if_needed();
}
}
@ -347,7 +347,7 @@ void do_statusbar_right(void)
{
if (statusbar_x < strlen(answer)) {
statusbar_x = move_mbright(answer, statusbar_x);
update_the_bar();
update_bar_if_needed();
}
}
@ -421,7 +421,7 @@ void do_statusbar_next_word(void)
break;
}
update_the_bar();
update_bar_if_needed();
}
/* Move to the previous word in the prompt text. */
@ -448,7 +448,7 @@ void do_statusbar_prev_word(void)
/* Move one character forward again to sit on the start of the word. */
statusbar_x = move_mbright(answer, statusbar_x);
update_the_bar();
update_bar_if_needed();
}
#endif /* !NANO_TINY */
@ -545,7 +545,7 @@ void update_the_statusbar(void)
}
/* Update the statusbar line /if/ the placewewant changes page. */
void update_the_bar(void)
void update_bar_if_needed(void)
{
size_t start_col = strlenpt(prompt) + 2;
size_t was_pww = statusbar_pww;

View File

@ -535,7 +535,7 @@ size_t statusbar_xplustabs(void);
size_t get_statusbar_page_start(size_t start_col, size_t column);
void reset_statusbar_cursor(void);
void update_the_statusbar(void);
void update_the_bar(void);
void update_bar_if_needed(void);
void total_statusbar_refresh(void (*refresh_func)(void));
functionptrtype get_prompt_string(int *value, bool allow_tabs,
#ifndef DISABLE_TABCOMP