mirror of
https://github.com/neon443/ShhShell.git
synced 2026-03-11 13:26:16 +00:00
can kinda type - it gets sent to teh server, but doesnt refres :skulk:
This commit is contained in:
@@ -332,7 +332,8 @@ class SSHHandler: ObservableObject {
|
||||
logger.critical("\(String(cString: ssh_get_error(&self.session)))")
|
||||
}
|
||||
|
||||
func writeToChannel(_ string: String) {
|
||||
func writeToChannel(_ string: String?) {
|
||||
guard let string = string else { return }
|
||||
guard ssh_channel_is_open(channel) != 0 else { return }
|
||||
guard ssh_channel_is_eof(channel) == 0 else { return }
|
||||
|
||||
@@ -343,4 +344,12 @@ class SSHHandler: ObservableObject {
|
||||
print("partial write!!")
|
||||
}
|
||||
}
|
||||
|
||||
func resizeTTY(toRows: Int, toCols: Int) {
|
||||
guard ssh_channel_is_open(channel) != 0 else { return }
|
||||
guard ssh_channel_is_eof(channel) == 0 else { return }
|
||||
|
||||
ssh_channel_change_pty_size(channel, Int32(toCols), Int32(toRows))
|
||||
print("resized tty to \(toRows)rows and \(toCols)cols")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user