You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
The text was updated successfully, but these errors were encountered:
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
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
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
I'm seeing a weird behavior when using
crypto/ssh/terminal
: when entering in a terminal connected to aTerminal
incrypto/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 ingolang.org/x/crypto/ssh/terminal
. It seems that it's due to theadvanceCursor
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?
The text was updated successfully, but these errors were encountered: