#14 ANSI terminal fixes

Unstable (example)
closed-accepted
nobody
None
5
2014-06-03
2008-09-10
Wil Mahan
No

Here are a couple of fixes I needed to use Nethack with the terminal emulator. First, the backspace character shouldn't erase the character at the current position.

Second--and I'm less sure about this--I had to make a carriage return move to the beginning of the current line and a linefeed move to the same column on the next line. This will work whenever the terminal receives \r\n for newlines but not when it only gets \n. My change seems to match what Nethack expects and what the ANSI terminal spec says. However, it breaks the test in ANSI.py and I don't know if it will break anything else.

Discussion

  • Wil Mahan

    Wil Mahan - 2008-09-10

    Fix backspaces, carriage returns, and linefeeds in terminal emulator

     
  • Nobody/Anonymous

    This has fixed a problems I have had with curses application displaying incorrectly.

     
  • Noah Spurrier

    Noah Spurrier - 2010-10-31

    Accepted all but the following patch section:
    if ch == '\n':
    - self.crlf()
    + self.lf()
    return
    This caused unit tests to fail.

     
  • Noah Spurrier

    Noah Spurrier - 2010-10-31
    • status: open --> open-accepted
     
  • Thomas Kluyver

    Thomas Kluyver - 2014-06-03
    • status: open-accepted --> closed-accepted
    • Group: --> Unstable (example)
     

Log in to post a comment.