PDCursesMod icon indicating copy to clipboard operation
PDCursesMod copied to clipboard

wclrtoeol() erases character at the end of the window

Open rhaberkorn opened this issue 5 months ago • 5 comments

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.

rhaberkorn avatar Sep 21 '24 22:09 rhaberkorn