You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This isn't an issue with tcell, per se, but I thought this might be a good place to ask.
I'm working on a personal project that provides an interface to a tcell (tview, actually) application via websockets to xterm.js in a browser. I am hitting an issue stemming from a lack of understanding of how TTY screen buffer contents translate to printable characters. I have boiled down my implementation to a minimum demonstration here: https://github.com/tjhowse/websockettty
This demonstration excludes all the websocket stuff and just tries to print the screenbuffer to the local terminal.
funcwithWebsocketTty(initScreenbool) {
// Make a WebsocketTty objecttty:= websockettty.WebsocketTty{}
// Look up a terminfo definition should workti, err:=tcell.LookupTerminfo("tmux")
iferr!=nil {
log.Fatal(err)
}
// Build a tcell.Screen objectscreen, err:=tcell.NewTerminfoScreenFromTtyTerminfo(&tty, ti)
iferr!=nil {
log.Fatal(err)
}
ifinitScreen {
screen.Init()
}
// if !screen.CanDisplay('=', false) {// log.Fatal("Your terminal cannot display the equals sign")// }// Build a tview applicationapp:=tview.NewApplication()
box:=tview.NewBox().SetBorder(true).SetTitle("Hi")
app.SetRoot(box, true)
// Start the application running in the background.app.SetScreen(screen)
goapp.Run()
// Crudely give it some time to draw.time.Sleep(time.Millisecond*100)
fmt.Printf("%s", tty.Screenbuffer)
}
This isn't an issue with tcell, per se, but I thought this might be a good place to ask.
I'm working on a personal project that provides an interface to a tcell (tview, actually) application via websockets to xterm.js in a browser. I am hitting an issue stemming from a lack of understanding of how TTY screen buffer contents translate to printable characters. I have boiled down my implementation to a minimum demonstration here: https://github.com/tjhowse/websockettty
This demonstration excludes all the websocket stuff and just tries to print the screenbuffer to the local terminal.
Expectation:
Reality:
Any help would be fantastic.
Cheers,
tjhowse.
The text was updated successfully, but these errors were encountered: