Use GetCursorPos instead of stored position
This commit is contained in:
parent
d97cdde38d
commit
be2918a616
1 changed files with 4 additions and 1 deletions
|
@ -131,6 +131,7 @@ func NewTerminal(cmd *exec.Cmd) (*Terminal, error) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
screen.Flush()
|
screen.Flush()
|
||||||
|
term.flushTerminal()
|
||||||
term.Invalidate()
|
term.Invalidate()
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
@ -290,7 +291,9 @@ func (term *Terminal) Draw(ctx *ui.Context) {
|
||||||
if !term.cursorShown {
|
if !term.cursorShown {
|
||||||
ctx.HideCursor()
|
ctx.HideCursor()
|
||||||
} else {
|
} else {
|
||||||
ctx.SetCursor(term.cursorPos.Col(), term.cursorPos.Row())
|
state := term.vterm.ObtainState()
|
||||||
|
row, col := state.GetCursorPos()
|
||||||
|
ctx.SetCursor(col, row)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue