move the leaveok() calls back to edit_refresh() from update_line()

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1666 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
master
David Lawrence Ramsey 2004-02-25 06:25:12 +00:00
parent 3af54d3ff5
commit b55e382dfc
2 changed files with 7 additions and 12 deletions

View File

@ -179,14 +179,8 @@ CVS code -
the "$" on subsequent pages. (DLR)
reset_cursor()
- Tweak for efficiency. (David Benbennick)
update_line()
- Move leaveok() calls here from edit_refresh(), since the
places where they were used in edit_refresh() mainly affected
the update_line()s. (DLR)
edit_refresh()
- Tweak for efficiency. (David Benbennick)
- Remove the aforementioned leaveok() calls from this function.
(DLR)
do_credits()
- Use nanosleep() instead of usleep(). The latter is only
standard under BSD, whereas the former is POSIX compliant.

View File

@ -1875,9 +1875,6 @@ void update_line(const filestruct *fileptr, size_t index)
if (line < 0 || line >= editwinrows)
return;
/* Don't make the cursor jump around the screen while updating. */
leaveok(edit, TRUE);
/* First, blank out the line (at a minimum) */
mvwaddstr(edit, line, 0, hblank);
@ -1898,9 +1895,6 @@ void update_line(const filestruct *fileptr, size_t index)
mvwaddch(edit, line, 0, '$');
if (strlenpt(fileptr->data) > page_start + COLS)
mvwaddch(edit, line, COLS - 1, '$');
/* Let the cursor jump around the screen again. */
leaveok(edit, FALSE);
}
/* This function updates current, based on where current_y is;
@ -1957,6 +1951,10 @@ void edit_refresh(void)
fprintf(stderr, "edit_refresh(): edittop->lineno = %ld\n", edittop->lineno);
#endif
/* Don't let the cursor jump around the screen while
* updating. */
leaveok(edit, TRUE);
while (nlines < editwinrows) {
update_line(foo, current_x);
nlines++;
@ -1972,6 +1970,9 @@ void edit_refresh(void)
/* What the hell are we expecting to update the screen if this
* isn't here? Luck? */
wrefresh(edit);
/* Let the cursor jump around the screen again. */
leaveok(edit, FALSE);
}
}