diff --git a/proxy.go b/proxy.go index e42143c..212017d 100644 --- a/proxy.go +++ b/proxy.go @@ -13,7 +13,6 @@ // CHANGES: // - update package - package gottyclient import ( @@ -50,6 +49,10 @@ func NewEscapeProxy(r io.Reader, escapeKeys []byte) io.Reader { func (r *escapeProxy) Read(buf []byte) (int, error) { nr, err := r.r.Read(buf) + if len(r.escapeKeys) == 0 { + return nr, err + } + preserve := func() { // this preserves the original key presses in the passed in buffer nr += r.escapeKeyPos