#65 wmove() does not move cursor

Karl Garrison

The wmove() function does not actually move the physical cursor on the screen. The move() function works normally, however. I reproduced this problem under both XCurses and SDLCurses. Attached is a short test program that demonstrates the problem - it works with ncurses, but not pdcurses.


  • Karl Garrison
    Karl Garrison

    test program to demonstrate wmove problem

  • Ah, I missed that you posted this here as well as the mailing list... I'll repost the response from there for anyone else reading this:

    It works fine. The problem in your test program is that after every wmove(), you're doing a getch(), which does an implicit refresh on stdscr (since getch() == wgetch(stdscr)), which moves the cursor back to the position it had in stdscr. If you replaced these with wgetch(win), it would work as you expect.

    The behavior is slightly different from ncurses, but it's not an error. In recent versions of PDCurses, wgetch() places the cursor at its current position in the window, since that's where the input text will appear. ncurses doesn't actually move the cursor until it starts outputting the text.

    • assigned_to: nobody --> wmcbrine
    • status: open --> closed-works-for-me