get rid of residual escape codes after skipping shell commands
Some applications (e.g. vim) seem to leave behind escape codes in the terminal after quitting. For some terminals (including xterm and gnome-terminal) this is somehow interpreted as key strokes by lf. This is a temporary fix to get rid of these escape codes by restarting termbox until we can find a proper way to handle this.
This commit is contained in:
parent
a6d92f4a12
commit
66ce56eb6e
6
ui.go
6
ui.go
@ -484,6 +484,12 @@ func (ui *UI) sync() {
|
||||
}
|
||||
termbox.SetCursor(0, 0)
|
||||
termbox.HideCursor()
|
||||
|
||||
// TODO: is there an easier way to clear residual escape codes?
|
||||
termbox.Close()
|
||||
if err := termbox.Init(); err != nil {
|
||||
log.Fatalf("initializing termbox: %s", err)
|
||||
}
|
||||
}
|
||||
|
||||
func (ui *UI) listBinds(binds map[string]Expr) {
|
||||
|
Loading…
Reference in New Issue
Block a user