can kinda type - it gets sent to teh server, but doesnt refres :skulk:

This commit is contained in:
neon443
2025-06-22 16:24:21 +01:00
parent e156d63cf6
commit b60e8f4eed
6 changed files with 87 additions and 63 deletions

View File

@@ -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")
}
}