]> git.wh0rd.org Git - nano.git/commitdiff
Renaming a function to the simpler 'need_statusbar_update()'
authorBenno Schulenberg <bensberg@justemail.net>
Mon, 20 Apr 2015 08:35:41 +0000 (08:35 +0000)
committerBenno Schulenberg <bensberg@justemail.net>
Mon, 20 Apr 2015 08:35:41 +0000 (08:35 +0000)
as there is no vertical counterpart.

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5208 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

ChangeLog
src/prompt.c
src/proto.h

index 6958182cae0bed1b4d062c11231dc1aa415df42e..1f04ffc055be6089ddfe79db2da98dcf268794c2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,8 @@
 2015-04-20  Benno Schulenberg  <bensberg@justemail.net>
        * 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  <bensberg@justemail.net>
        * src/global.c, src/nano.c, doc/man/nanorc.5, doc/texinfo/nano.texi:
index 89d0a86c93b80179bf8d792dd3fa2d96102459d7..38178df7ba6f0d8cdc38f5ea57b1254f1c4a3b17 100644 (file)
@@ -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;
 
index 3a6e593f73d55a14840a7135dcb611d8a12103cb..823386a7e8b4bb99700fbba44eb18124aa4721ff 100644 (file)
@@ -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