Skip to content

Commit

Permalink
Comment out newline replacements
Browse files Browse the repository at this point in the history
As suggested by gliderlabs#129 to fix
side-by-side splits in screen/tmux
  • Loading branch information
infinisil committed Aug 10, 2021
1 parent c9fc441 commit 4cac59c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions session.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@ func (sess *session) Write(p []byte) (n int, err error) {
m := len(p)
// normalize \n to \r\n when pty is accepted.
// this is a hardcoded shortcut since we don't support terminal modes.
p = bytes.Replace(p, []byte{'\n'}, []byte{'\r', '\n'}, -1)
p = bytes.Replace(p, []byte{'\r', '\r', '\n'}, []byte{'\r', '\n'}, -1)
// p = bytes.Replace(p, []byte{'\n'}, []byte{'\r', '\n'}, -1)
// p = bytes.Replace(p, []byte{'\r', '\r', '\n'}, []byte{'\r', '\n'}, -1)
n, err = sess.Channel.Write(p)
if n > m {
n = m
Expand Down

0 comments on commit 4cac59c

Please sign in to comment.