bug-ncurses
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

wclrtoeol not clearing entire line?


From: Bob Rossi
Subject: wclrtoeol not clearing entire line?
Date: Thu, 11 Aug 2016 10:07:41 -0400
User-agent: Mutt/1.5.24 (2015-08-30)

Hi,

I use ncurses for cgdb development. Thanks for all your hard work.

cgdb displays a gdb window. Previously, I had the gdb prompt always at
the bottom line. Therefor the cursor was always on the bottom line. 

I'm changing cgdb to have the gdb prompt start at the top line.
The prompt moves down as necessary, just like using gdb at a terminal.
This means the cursor is now moving between lines, top down, instead of
always on the last line.

This leads me to the problem I've run into.

When I clear a line with wclrtoeol, it does not seem to clear the
old cursor on that line. Is this a known issue? Is there a work around?
I'll keep this picture here temporarily,
  http://brasko.net:81/cgdb_cursor_not_cleared.png
See the extra cursor characters that were not cleared by wclrtoeol.

A few things I've tried.
- Calling werase before I draw the window: old cursor persists
- Calling wclear before I draw the window: old cursor gone, solved
- Overwriting the old cursor location with a space: old cursor persists
- Overwriting the old cursor with an 'x': old cursor gone, but don't want x :)

I'm pretty naive about how ncurses works, but I've read about the
virtual screen that it keeps internally. My thoughts are that it is not
aware that the cursor location has moved, and doesn't understand it
needs to clean up the old cursor location.

I don't really want to call wclear, as I'm guessing that's heavy handed.

Any suggestions on how to resolve this issue?

Thanks,
Bob Rossi



reply via email to

[Prev in Thread] Current Thread [Next in Thread]