mirror of
https://github.com/kovidgoyal/kitty
synced 2026-06-08 14:18:26 +02:00
Simplify icat code and write to STDOUT rather than the terminal device
The terminal device is now used only for detection.
This commit is contained in:
@@ -261,9 +261,11 @@ func (self *Loop) SetCursorVisible(visible bool) {
|
||||
}
|
||||
}
|
||||
|
||||
const MoveCursorToTemplate = "\x1b[%d;%dH"
|
||||
|
||||
func (self *Loop) MoveCursorTo(x, y int) {
|
||||
if x > 0 && y > 0 {
|
||||
self.QueueWriteString(fmt.Sprintf("\x1b[%d;%dH", y, x))
|
||||
self.QueueWriteString(fmt.Sprintf(MoveCursorToTemplate, y, x))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user