PDCursesMod
PDCursesMod copied to clipboard
wclrtoeol() erases character at the end of the window
In the following example, the last "X" got erased, apparently by wclrtoeol():
#include <curses.h>
int main(void)
{
initscr();
refresh(); // erases screen
WINDOW *win = newwin(1,0,0,0);
mvwaddstr(win, 0, getmaxx(win)-3, "XXX");
wclrtoeol(win); // try to comment this out!
wrefresh(win);
getch();
endwin();
return 0;
}
Interestingly this works as expected when writing directly to stdscr at the line end.