miscellaneous minor fixes

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3854 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
master
David Lawrence Ramsey 2006-08-26 16:50:51 +00:00
parent e1e2cb7064
commit fa38795ef5
4 changed files with 20 additions and 20 deletions

View File

@ -910,13 +910,13 @@ void update_statusbar_line(const char *curranswer, size_t index)
}
/* Return TRUE if we need an update after moving horizontally, and FALSE
* otherwise. We need one if old_pww and statusbar_pww are on different
* pages. */
bool need_statusbar_horizontal_update(size_t old_pww)
* otherwise. We need one if pww_save and statusbar_pww are on
* different pages. */
bool need_statusbar_horizontal_update(size_t pww_save)
{
size_t start_col = strlenpt(prompt) + 1;
return get_statusbar_page_start(start_col, start_col + old_pww) !=
return get_statusbar_page_start(start_col, start_col + pww_save) !=
get_statusbar_page_start(start_col, start_col + statusbar_pww);
}

View File

@ -518,7 +518,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 old_pww);
bool need_statusbar_horizontal_update(size_t pww_save);
void total_statusbar_refresh(void (*refresh_func)(void));
int get_prompt_string(bool allow_tabs,
#ifndef DISABLE_TABCOMP
@ -773,10 +773,10 @@ void reset_cursor(void);
void edit_draw(const filestruct *fileptr, const char *converted, int
line, size_t start);
void update_line(const filestruct *fileptr, size_t index);
bool need_horizontal_update(size_t old_pww);
bool need_vertical_update(size_t old_pww);
bool need_horizontal_update(size_t pww_save);
bool need_vertical_update(size_t pww_save);
void edit_scroll(scroll_dir direction, ssize_t nlines);
void edit_redraw(const filestruct *old_current, size_t old_pww);
void edit_redraw(const filestruct *old_current, size_t pww_save);
void edit_refresh(void);
void edit_update(update_type location);
void total_redraw(void);

View File

@ -421,7 +421,7 @@ void do_search(void)
{
filestruct *fileptr = openfile->current;
size_t fileptr_x = openfile->current_x;
size_t old_pww = openfile->placewewant;
size_t pww_save = openfile->placewewant;
int i;
bool didfind;
@ -493,7 +493,7 @@ void do_search(void)
}
openfile->placewewant = xplustabs();
edit_redraw(fileptr, old_pww);
edit_redraw(fileptr, pww_save);
search_replace_abort();
}
@ -503,7 +503,7 @@ void do_research(void)
{
filestruct *fileptr = openfile->current;
size_t fileptr_x = openfile->current_x;
size_t old_pww = openfile->placewewant;
size_t pww_save = openfile->placewewant;
bool didfind;
search_init_globals();
@ -555,7 +555,7 @@ void do_research(void)
statusbar(_("No current search pattern"));
openfile->placewewant = xplustabs();
edit_redraw(fileptr, old_pww);
edit_redraw(fileptr, pww_save);
search_replace_abort();
}
#endif

View File

@ -2706,28 +2706,28 @@ void update_line(const filestruct *fileptr, size_t index)
}
/* Return TRUE if we need an update after moving horizontally, and FALSE
* otherwise. We need one if the mark is on or if old_pww and
* otherwise. We need one if the mark is on or if pww_save and
* placewewant are on different pages. */
bool need_horizontal_update(size_t old_pww)
bool need_horizontal_update(size_t pww_save)
{
return
#ifndef NANO_TINY
openfile->mark_set ||
#endif
get_page_start(old_pww) !=
get_page_start(pww_save) !=
get_page_start(openfile->placewewant);
}
/* Return TRUE if we need an update after moving vertically, and FALSE
* otherwise. We need one if the mark is on or if old_pww and
* otherwise. We need one if the mark is on or if pww_save and
* placewewant are on different pages. */
bool need_vertical_update(size_t old_pww)
bool need_vertical_update(size_t pww_save)
{
return
#ifndef NANO_TINY
openfile->mark_set ||
#endif
get_page_start(old_pww) !=
get_page_start(pww_save) !=
get_page_start(openfile->placewewant);
}
@ -2837,10 +2837,10 @@ void edit_scroll(scroll_dir direction, ssize_t nlines)
/* Update any lines between old_current and current that need to be
* updated. Use this if we've moved without changing any text. */
void edit_redraw(const filestruct *old_current, size_t old_pww)
void edit_redraw(const filestruct *old_current, size_t pww_save)
{
bool do_redraw = need_vertical_update(0) ||
need_vertical_update(old_pww);
need_vertical_update(pww_save);
const filestruct *foo = NULL;
/* If either old_current or current is offscreen, scroll the edit