How to clear a specific line with NCurses?

前端 未结 4 1129
傲寒
傲寒 2020-12-06 10:30

How to clear a specific line with NCurses?

I need to wipe a line on the screen without redrawing the whole thing. How do I do that?

4条回答
  •  春和景丽
    2020-12-06 11:00

    This is how I ended up doing it for my purposes.

    int y, x;            // to store where you are
    getyx(stdscr, y, x); // save current pos
    move(y, 0);          // move to begining of line
    clrtoeol();          // clear line
    move(y, x);          // move back to where you were
    

提交回复
热议问题