#65 wmove() does not move cursor

closed-works-for-me
None
5
2014-12-13
2009-02-11
No

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.

Discussion

  • Karl Garrison

    Karl Garrison - 2009-02-11

    test program to demonstrate wmove problem

     
  • William McBrine

    William McBrine - 2009-03-22

    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.

     
  • William McBrine

    William McBrine - 2009-03-22
    • assigned_to: nobody --> wmcbrine
    • status: open --> closed-works-for-me
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks