mirror of
https://github.com/Maks1mS/bubbles.git
synced 2025-03-13 12:33:43 +03:00
Add cursor positioning functions to viewport renderder
This commit is contained in:
parent
3321ac12a9
commit
d9c03fc0b0
@ -95,3 +95,11 @@ func clearLine(w io.Writer) {
|
||||
func insertLine(w io.Writer, numLines int) {
|
||||
fmt.Fprintf(w, te.CSI+"%dL", numLines)
|
||||
}
|
||||
|
||||
func saveCursorPosition(w io.Writer) {
|
||||
fmt.Fprint(w, te.CSI+"s")
|
||||
}
|
||||
|
||||
func restoreCursorPosition(w io.Writer) {
|
||||
fmt.Fprint(w, te.CSI+"u")
|
||||
}
|
||||
|
@ -21,8 +21,8 @@ type Model struct {
|
||||
// It's used in high performance rendering.
|
||||
Y int
|
||||
|
||||
// UseInternalRenderer specifies whether or not to use the pager's internal,
|
||||
// high performance renderer to paint the screen.
|
||||
// UseInternalRenderer specifies whether or not to use the pager's
|
||||
// internal, high performance renderer to paint the screen.
|
||||
UseInternalRenderer bool
|
||||
|
||||
lines []string
|
||||
|
Loading…
Reference in New Issue
Block a user