mirror of
git://git.sv.gnu.org/nano.git
synced 2024-11-22 12:51:23 +03:00
Eliding an unneeded function.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5587 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
This commit is contained in:
parent
f01dd29f48
commit
decee32067
@ -7,6 +7,7 @@
|
|||||||
Chop an always-FALSE parameter and delete an unused return value.
|
Chop an always-FALSE parameter and delete an unused return value.
|
||||||
* src/prompt.c (do_prompt): Remove a superfluous free.
|
* src/prompt.c (do_prompt): Remove a superfluous free.
|
||||||
* src/prompt.c (update_the_bar): Bundle some statements.
|
* src/prompt.c (update_the_bar): Bundle some statements.
|
||||||
|
* src/prompt.c (need_statusbar_update): Elide this function.
|
||||||
|
|
||||||
2016-01-22 Benno Schulenberg <bensberg@justemail.net>
|
2016-01-22 Benno Schulenberg <bensberg@justemail.net>
|
||||||
* src/utils.c (get_homedir): Don't use $HOME when we're root, because
|
* src/utils.c (get_homedir): Don't use $HOME when we're root, because
|
||||||
|
15
src/prompt.c
15
src/prompt.c
@ -646,25 +646,16 @@ void update_statusbar_line(const char *curranswer, size_t index)
|
|||||||
wnoutrefresh(bottomwin);
|
wnoutrefresh(bottomwin);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 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_update(size_t pww_save)
|
|
||||||
{
|
|
||||||
size_t start_col = strlenpt(prompt) + 2;
|
|
||||||
|
|
||||||
return get_statusbar_page_start(start_col, start_col + pww_save) !=
|
|
||||||
get_statusbar_page_start(start_col, start_col + statusbar_pww);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Update the statusbar line /if/ the placewewant changes page. */
|
/* Update the statusbar line /if/ the placewewant changes page. */
|
||||||
void update_the_bar(void)
|
void update_the_bar(void)
|
||||||
{
|
{
|
||||||
|
size_t start_col = strlenpt(prompt) + 2;
|
||||||
size_t was_pww = statusbar_pww;
|
size_t was_pww = statusbar_pww;
|
||||||
|
|
||||||
statusbar_pww = statusbar_xplustabs();
|
statusbar_pww = statusbar_xplustabs();
|
||||||
|
|
||||||
if (need_statusbar_update(was_pww))
|
if (get_statusbar_page_start(start_col, start_col + statusbar_pww) !=
|
||||||
|
get_statusbar_page_start(start_col, start_col + was_pww))
|
||||||
update_statusbar_line(answer, statusbar_x);
|
update_statusbar_line(answer, statusbar_x);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -536,7 +536,6 @@ size_t statusbar_xplustabs(void);
|
|||||||
size_t get_statusbar_page_start(size_t start_col, size_t column);
|
size_t get_statusbar_page_start(size_t start_col, size_t column);
|
||||||
void reset_statusbar_cursor(void);
|
void reset_statusbar_cursor(void);
|
||||||
void update_statusbar_line(const char *curranswer, size_t index);
|
void update_statusbar_line(const char *curranswer, size_t index);
|
||||||
bool need_statusbar_update(size_t pww_save);
|
|
||||||
void update_the_bar(void);
|
void update_the_bar(void);
|
||||||
void total_statusbar_refresh(void (*refresh_func)(void));
|
void total_statusbar_refresh(void (*refresh_func)(void));
|
||||||
functionptrtype get_prompt_string(int *value, bool allow_tabs,
|
functionptrtype get_prompt_string(int *value, bool allow_tabs,
|
||||||
|
Loading…
Reference in New Issue
Block a user