From c05480905c2ea41fd2812e7287a9e445436ab760 Mon Sep 17 00:00:00 2001 From: bergyu Date: Thu, 3 Jun 2021 16:41:20 +0800 Subject: [PATCH] opt some --- base/ssh/connect.go | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/base/ssh/connect.go b/base/ssh/connect.go index 89699a3a..76e46ae0 100644 --- a/base/ssh/connect.go +++ b/base/ssh/connect.go @@ -28,11 +28,6 @@ func _ssh_open(m *ice.Message, arg ...string) { defer terminal.Restore(fd, oldState) } - gdb.SignalNotify(m, 28, func() { - w, h, _ := terminal.GetSize(fd) - _ssh_sizes(os.Stdin.Fd(), w, h) - }) - // 设置宽高 w, h, _ := terminal.GetSize(fd) c.Write([]byte(fmt.Sprintf("#height:%d,width:%d\n", h, w))) @@ -94,11 +89,11 @@ func _ssh_dial(m *ice.Message, cb func(net.Conn), arg ...string) { ssh.TTY_OP_OSPEED: 14400, }) - // gdb.SignalNotify(m, 28, func() { - // w, h, _ := terminal.GetSize(int(os.Stdin.Fd())) - // session.WindowChange(h, w) - // }) - // + gdb.SignalNotify(m, 28, func() { + w, h, _ := terminal.GetSize(int(os.Stdin.Fd())) + session.WindowChange(h, w) + }) + session.Shell() session.Wait() })