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 1c4be3d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"io"
"io/ioutil"

"github.com/gliderlabs/ssh"
"github.com/tweag/gliderlabs-ssh"
)

func ExampleListenAndServe() {
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/gliderlabs/ssh
module github.com/tweag/gliderlabs-ssh

go 1.12

Expand Down
5 changes: 2 additions & 3 deletions session.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package ssh

import (
"bytes"
"context"
"errors"
"fmt"
Expand Down Expand Up @@ -133,8 +132,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 1c4be3d

Please sign in to comment.