From: Benno Schulenberg Date: Mon, 20 Apr 2015 08:35:41 +0000 (+0000) Subject: Renaming a function to the simpler 'need_statusbar_update()' X-Git-Tag: v2.4.2~69 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=ec0e0235fab6b3f51b12e3b7afd699ea49674c9f;p=nano.git Renaming a function to the simpler 'need_statusbar_update()' as there is no vertical counterpart. git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5208 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- diff --git a/ChangeLog b/ChangeLog index 6958182c..1f04ffc0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,8 @@ 2015-04-20 Benno Schulenberg * src/winio.c (need_horizontal_update, need_vertical_update): Fuse two identical functions into one: need_screen_update(). + * src/prompt.c (need_statusbar_horizontal_update): Rename function + to need_statusbar_update() as there is no vertical counterpart. 2015-04-18 Benno Schulenberg * src/global.c, src/nano.c, doc/man/nanorc.5, doc/texinfo/nano.texi: diff --git a/src/prompt.c b/src/prompt.c index 89d0a86c..38178df7 100644 --- a/src/prompt.c +++ b/src/prompt.c @@ -245,7 +245,7 @@ int do_statusbar_mouse(void) statusbar_xplustabs()) + mouse_x - start_col); statusbar_pww = statusbar_xplustabs(); - if (need_statusbar_horizontal_update(pww_save)) + if (need_statusbar_update(pww_save)) update_statusbar_line(answer, statusbar_x); } } @@ -347,7 +347,7 @@ void do_statusbar_home(void) statusbar_pww = statusbar_xplustabs(); } - if (need_statusbar_horizontal_update(pww_save)) + if (need_statusbar_update(pww_save)) update_statusbar_line(answer, statusbar_x); } @@ -359,7 +359,7 @@ void do_statusbar_end(void) statusbar_x = strlen(answer); statusbar_pww = statusbar_xplustabs(); - if (need_statusbar_horizontal_update(pww_save)) + if (need_statusbar_update(pww_save)) update_statusbar_line(answer, statusbar_x); } @@ -372,7 +372,7 @@ void do_statusbar_left(void) statusbar_x = move_mbleft(answer, statusbar_x); statusbar_pww = statusbar_xplustabs(); - if (need_statusbar_horizontal_update(pww_save)) + if (need_statusbar_update(pww_save)) update_statusbar_line(answer, statusbar_x); } } @@ -386,7 +386,7 @@ void do_statusbar_right(void) statusbar_x = move_mbright(answer, statusbar_x); statusbar_pww = statusbar_xplustabs(); - if (need_statusbar_horizontal_update(pww_save)) + if (need_statusbar_update(pww_save)) update_statusbar_line(answer, statusbar_x); } } @@ -500,7 +500,7 @@ bool do_statusbar_next_word(bool allow_punct) statusbar_pww = statusbar_xplustabs(); - if (need_statusbar_horizontal_update(pww_save)) + if (need_statusbar_update(pww_save)) update_statusbar_line(answer, statusbar_x); /* Return whether we started on a word. */ @@ -595,7 +595,7 @@ bool do_statusbar_prev_word(bool allow_punct) statusbar_pww = statusbar_xplustabs(); - if (need_statusbar_horizontal_update(pww_save)) + if (need_statusbar_update(pww_save)) update_statusbar_line(answer, statusbar_x); /* Return whether we started on a word. */ @@ -698,10 +698,10 @@ void update_statusbar_line(const char *curranswer, size_t index) wnoutrefresh(bottomwin); } -/* Return TRUE if we need an update after moving horizontally, and FALSE - * otherwise. We need one if pww_save and statusbar_pww are on +/* Return TRUE if we need an update after moving the cursor, and FALSE + * otherwise. We need an update if pww_save and statusbar_pww are on * different pages. */ -bool need_statusbar_horizontal_update(size_t pww_save) +bool need_statusbar_update(size_t pww_save) { size_t start_col = strlenpt(prompt) + 2; diff --git a/src/proto.h b/src/proto.h index 3a6e593f..823386a7 100644 --- a/src/proto.h +++ b/src/proto.h @@ -522,7 +522,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_statusbar_line(const char *curranswer, size_t index); -bool need_statusbar_horizontal_update(size_t pww_save); +bool need_statusbar_update(size_t pww_save); void total_statusbar_refresh(void (*refresh_func)(void)); functionptrtype get_prompt_string(int *value, bool allow_tabs, #ifndef DISABLE_TABCOMP