API to save/restore cursor position
This commit is contained in:
parent
1aa9f1e62d
commit
a2e4efbb14
@ -195,6 +195,14 @@ func (self *Loop) Println(args ...any) {
|
||||
self.QueueWriteString("\r\n")
|
||||
}
|
||||
|
||||
func (self *Loop) SaveCursor() {
|
||||
self.QueueWriteString("\x1b7")
|
||||
}
|
||||
|
||||
func (self *Loop) RestoreCursor() {
|
||||
self.QueueWriteString("\x1b8")
|
||||
}
|
||||
|
||||
func (self *Loop) Printf(format string, args ...any) {
|
||||
format = strings.ReplaceAll(format, "\n", "\r\n")
|
||||
self.QueueWriteString(fmt.Sprintf(format, args...))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user