diff options
author | Drew DeVault <sir@cmpwn.com> | 2019-03-21 21:19:34 -0400 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2019-03-21 21:19:34 -0400 |
commit | be2918a6164989aba5b18b4f642501ddb8801c10 (patch) | |
tree | 6da3378babff1047b9a3a79e67f77fa7cae0f495 /widgets | |
parent | d97cdde38dfaf8d7f63d5f86eb9eac4eab359dc4 (diff) |
Use GetCursorPos instead of stored position
Diffstat (limited to 'widgets')
-rw-r--r-- | widgets/terminal.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/widgets/terminal.go b/widgets/terminal.go index 5b0be1a..7aaeda0 100644 --- a/widgets/terminal.go +++ b/widgets/terminal.go @@ -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) } } |