#63 backspace doesn't work when using a windows console

closed-rejected
None
5
2008-07-18
2008-07-18
Anonymous
No

The backspace key does not delete the character to the left. Instead the cursor moves to the right leaving the character that should have been deleted still displayed on the screen.

Someone else also ran into this problem:
http://www.cygwin.com/ml/gdb-patches/2006-02/msg00180.html

Attached is a patch that fixes this problem in tputs()

Jon

Discussion

    • assigned_to: nobody --> wmcbrine
    • status: open --> closed-rejected
     
  • Logged In: YES
    user_id=27933
    Originator: NO

    Backspace works fine -- in an actual curses-based app. Your problem (or at least, the one at the URL you gave) is readline, which uses terminfo, not curses. PDCurses, unlike most implementations of curses, is not based on terminfo, and does not provide usable terminfo functions. Such terminfo functions as are present are stubs, intended only to allow linking, but not usage. (Some non-C interfaces to curses incorporate the terminfo functions and require them to be there to link, although they are not needed for curses apps.) All they do is to return the appropriate errors.

    Your patch would not change this. It may trick readline into working, but it has almost nothing to do with PDCurses itself.

    I received a patch identical to yours at the time of the cited discussion. I rejected it then, and I see no reason to change my mind now.

    About the only thing I'd want to do with regard to terminfo would be to allow disabling it during the build, so you could perhaps link with both PDCurses, and a working terminfo library. But that's a pain. And you'd probably be better off, if you must use terminfo, linking with a curses library that also uses/provides terminfo, like ncurses.