diff --git a/drivers/cga/cga.go b/drivers/cga/cga.go index eaec4c6..cf30a10 100644 --- a/drivers/cga/cga.go +++ b/drivers/cga/cga.go @@ -21,6 +21,10 @@ func setCursorColumn(n int) { getbackend().SetPos(pos) } +func setCursorHome() { + getbackend().SetPos(0) +} + func eraseLine(method EraseMethod) { backend := getbackend() pos := backend.GetPos() @@ -69,6 +73,7 @@ func writeCSI(action byte, params []string) { // Hopefully nobody ever uses my fork if they expect that functionality case 'J': eraseLine(EraseMethod_All) + setCursorHome() default: panic("unsupported CSI action")