Skip to content

Commit

Permalink
wreadln: use wclrtoeol() instead of whline()
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxKellermann committed Sep 6, 2024
1 parent 223c317 commit ad9dced
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/wreadln.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -194,13 +194,13 @@ void
wreadln::Paint() const noexcept
{
window.MoveCursor(point);
/* clear input area */
window.HLine(width, ' ');
/* print visible part of the line buffer */
if (masked)
window.HLine(StringWidthMB(value.substr(start)), '*');
else
window.String({value.c_str() + start, screen_to_bytes(value.c_str() + start, width)});
/* clear the rest */
window.ClearToEol();
/* move the cursor to the correct position */
window.MoveCursor({point.x + (int)GetCursorColumn(), point.y});
/* tell ncurses to redraw the screen */
Expand Down

0 comments on commit ad9dced

Please sign in to comment.