commit e6c629951f321fe1f932cace76529b2512c202ae
parent c06d5452f59fba4788866b5061f3e069fd2de496
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Sun, 23 Jun 2019 20:40:22 +0200
display: use a somewhat faster method to clear a row
On an 80-column terminal, using a single printw() instead of
a loop of addch() reduces the time taken with 13 percent.
Diffstat:
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/src/winio.c b/src/winio.c
@@ -1794,10 +1794,7 @@ const keystruct *get_shortcut(int *kbinput)
* current attributes. */
void blank_row(WINDOW *win, int y, int x, int n)
{
- wmove(win, y, x);
-
- for (; n > 0; n--)
- waddch(win, ' ');
+ mvwprintw(win, y, x, "%*s", n, " ");
}
/* Blank the first line of the top portion of the window. */