Skip to content

Commit cc41910

Browse files
committed
fix terminal columns on Windows #7
1 parent 462bd25 commit cc41910

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

tsshd/utils_windows.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ func (p *tsshdPty) Close() error {
5252
}
5353

5454
func (p *tsshdPty) Resize(cols, rows int) error {
55-
return p.cpty.Resize(cols, rows)
55+
return p.cpty.Resize(cols-1, rows)
5656
}
5757

5858
func newTsshdPty(cmd *exec.Cmd, cols, rows int) (*tsshdPty, error) {
@@ -63,7 +63,7 @@ func newTsshdPty(cmd *exec.Cmd, cols, rows int) (*tsshdPty, error) {
6363
}
6464
cmdLine.WriteString(windows.EscapeArg(arg))
6565
}
66-
cpty, err := conpty.Start(cmdLine.String(), conpty.ConPtyDimensions(cols, rows), conpty.ConPtyEnv(cmd.Env))
66+
cpty, err := conpty.Start(cmdLine.String(), conpty.ConPtyDimensions(cols-1, rows), conpty.ConPtyEnv(cmd.Env))
6767
if err != nil {
6868
return nil, err
6969
}

0 commit comments

Comments
 (0)