Use GetCursorPos instead of stored position

This commit is contained in:
Drew DeVault 2019-03-21 21:19:34 -04:00
parent d97cdde38d
commit be2918a616
1 changed files with 4 additions and 1 deletions

View File

@ -131,6 +131,7 @@ func NewTerminal(cmd *exec.Cmd) (*Terminal, error) {
return
}
screen.Flush()
term.flushTerminal()
term.Invalidate()
}
}()
@ -290,7 +291,9 @@ func (term *Terminal) Draw(ctx *ui.Context) {
if !term.cursorShown {
ctx.HideCursor()
} else {
ctx.SetCursor(term.cursorPos.Col(), term.cursorPos.Row())
state := term.vterm.ObtainState()
row, col := state.GetCursorPos()
ctx.SetCursor(col, row)
}
}