Fixes screen flickering on urxvt.

Erase() is ncurses optimal for screen refresh. Clear() blanks the
entire screen first, which produces a flickering output on urxvt.
This commit is contained in:
Chris
2016-06-19 01:58:46 -07:00
parent ef39290e11
commit 4fbecbe54c

View File

@@ -296,7 +296,7 @@ void show_ncurses(Line *lines[], int nproc) {
getmaxyx(stdscr, rows, cols); /* find the boundaries of the screeen */ getmaxyx(stdscr, rows, cols); /* find the boundaries of the screeen */
if (cols < 62) { if (cols < 62) {
clear(); erase();
mvprintw(0, 0, mvprintw(0, 0,
"The terminal is too narrow! Please make it wider.\nI'll wait..."); "The terminal is too narrow! Please make it wider.\nI'll wait...");
return; return;
@@ -307,7 +307,7 @@ void show_ncurses(Line *lines[], int nproc) {
proglen = cols - 55; proglen = cols - 55;
clear(); erase();
mvprintw(0, 0, "%s", caption->c_str()); mvprintw(0, 0, "%s", caption->c_str());
attron(A_REVERSE); attron(A_REVERSE);
mvprintw(2, 0, mvprintw(2, 0,