Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/crypto/ssh/terminal: redundant line break when reaching end of line #9319

Closed
songgao opened this issue Dec 15, 2014 · 3 comments
Closed

x/crypto/ssh/terminal: redundant line break when reaching end of line #9319

songgao opened this issue Dec 15, 2014 · 3 comments
Milestone

Comments

@songgao
Copy link

@songgao songgao commented Dec 15, 2014

I'm seeing a weird behavior when using crypto/ssh/terminal: when entering in a terminal connected to a Terminal in crypto/ssh/terminal, hitting the end of a line (last column of a row), an additional line break is automatically inserted, even when the client terminal already does wrapping.

The behavior does not exist in the code.google.com/p/go/... import, but is in golang.org/x/crypto/ssh/terminal. It seems that it's due to the advanceCursor function defined here: https://github.com/golang/crypto/blob/5ff91abc762244e802d98aa34c6c0d78f70791f3/ssh/terminal/terminal.go#L317, which seems to be a "feature" but unfortunately becomes a problem in some terminals (iTerm 2 on Mac, term.js in my case). A hacky workaround is to set the width to a ridiculously large integer, but that's barely an answer.

What terminal was that inserted line break addressing? Would it be possible to selectively turn off that feature, or auto detect client terminal type?

@songgao
Copy link
Author

@songgao songgao commented Dec 15, 2014

Related Issue in shazow/ssh-chat: shazow/ssh-chat#22

@Kealper
Copy link

@Kealper Kealper commented Dec 15, 2014

PuTTY and Windows' Command Prompt also fight against the added line break, and both also act like one would expect when the line break is removed from the code.

@mikioh mikioh changed the title crypto/ssh/terminal: redundant line break when reaching end of line ssh/terminal: redundant line break when reaching end of line Jan 4, 2015
@mikioh mikioh added the repo-crypto label Jan 4, 2015
@rsc rsc added this to the Unplanned milestone Apr 10, 2015
@rsc rsc changed the title ssh/terminal: redundant line break when reaching end of line x/crypto/ssh/terminal: redundant line break when reaching end of line Apr 14, 2015
@rsc rsc modified the milestones: Unreleased, Unplanned Apr 14, 2015
@rsc rsc removed the repo-crypto label Apr 14, 2015
@shazow
Copy link
Contributor

@shazow shazow commented Feb 8, 2018

I'm not sure when this was fixed, but I can no longer reproduce this bug. 🎆

Perhaps golang/crypto@95cb608 did the trick?

I suggest closing this issue unless someone can still reproduce it.

@davecheney davecheney closed this Feb 8, 2018
@golang golang locked and limited conversation to collaborators Feb 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
7 participants
You can’t perform that action at this time.