mirror of
https://github.com/Maks1mS/bubbles.git
synced 2025-03-14 13:03:44 +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) {
|
func insertLine(w io.Writer, numLines int) {
|
||||||
fmt.Fprintf(w, te.CSI+"%dL", numLines)
|
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.
|
// It's used in high performance rendering.
|
||||||
Y int
|
Y int
|
||||||
|
|
||||||
// UseInternalRenderer specifies whether or not to use the pager's internal,
|
// UseInternalRenderer specifies whether or not to use the pager's
|
||||||
// high performance renderer to paint the screen.
|
// internal, high performance renderer to paint the screen.
|
||||||
UseInternalRenderer bool
|
UseInternalRenderer bool
|
||||||
|
|
||||||
lines []string
|
lines []string
|
||||||
|
Loading…
Reference in New Issue
Block a user