Giter Site home page Giter Site logo

Comments (2)

rprichard avatar rprichard commented on July 20, 2024

This is one of the ways the Windows console and Unix terminals differ. After writing the last character in a line, the Windows console immediately advances by a line. A Unix terminal, on the other hand, moves the cursor to the position just after the last cell in the line. Line advancement doesn't happen until the first character of the next line is output, or if a CR is output, no advancement happens at all. (This behavior allows writing to the bottom-right cell.)

This can be verified using echo. It can be helpful to write out a "DSR", where the terminal reports the cursor position as keyboard input. e.g. echo -e "xxxxxx\e[6nyyyyyy\e[6n"

The current #21 fix will work for sequential output where the CRLF is redundant. I would expect it to break if a full line were instead modified. (Successive modifications should appear to walk up the terminal.) I think the fix could be modified to let the terminal wrap in some cases, but I'm concerned about how rewrapping terminals (e.g. the OS X terminal) would handle it.

What terminal are you using to display the output of winpty? (Perhaps you're using the Windows console?)

from winpty.

aleherb avatar aleherb commented on July 20, 2024

I am viewing the output in the Eclipse Terminal view (which should actually behave like a Unix terminal), but I do see now that it does not handle the line wrap case in the same way as e.g. an xterm. Anyway, thanks for the hints! I'll close this bug and redirect the issue to the Eclipse Terminal view then.

from winpty.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.