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
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();
}
}
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. */
{
if (statusbar_x > 0) {
statusbar_x = move_mbleft(answer, statusbar_x);
- update_the_bar();
+ update_bar_if_needed();
}
}
{
if (statusbar_x < strlen(answer)) {
statusbar_x = move_mbright(answer, statusbar_x);
- update_the_bar();
+ update_bar_if_needed();
}
}
break;
}
- update_the_bar();
+ update_bar_if_needed();
}
/* Move to the previous word in the prompt text. */
/* 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 */
}
/* 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;
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