Skip to content
Myr

Remove cursor save/restore as it was wrecking things

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Also, um, we didn't need it.

authored by Christian Rocha · committed by Christian Rocha · parent d4d553c · Browse files · 2 files+0 added−12 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+0 added−12 removed

  • other:+0 added−12 removed

2 files+0 added−12 removed

modified:renderer.go-4 removed
207 unmodified lines
208209 topBoundary += 1210 b := new(bytes.Buffer)211212 saveCursorPosition(b)212 changeScrollingRegion(b, topBoundary, bottomBoundary)213 moveCursor(b, topBoundary, 0)214 insertLine(b, len(lines))215 _, _ = io.WriteString(b, strings.Join(lines, "\r\n"))216 changeScrollingRegion(b, 0, r.height)218 restoreCursorPosition(b)217218 r.out.Write(b.Bytes())219}220
12 unmodified lines
233234 topBoundary += 1235 b := new(bytes.Buffer)236239 saveCursorPosition(b)237 changeScrollingRegion(b, topBoundary, bottomBoundary)238 moveCursor(b, bottomBoundary, 0)239 _, _ = io.WriteString(b, "\r\n"+strings.Join(lines, "\r\n"))240 changeScrollingRegion(b, 0, r.height)244 restoreCursorPosition(b)241242 r.out.Write(b.Bytes())243}244
118 unmodified lines
modified:screen.go-8 removed
25 unmodified lines
26func moveCursor(w io.Writer, row, col int) {27 fmt.Fprintf(w, te.CSI+te.CursorPositionSeq, row, col)28}2930func saveCursorPosition(w io.Writer) {31 fmt.Fprint(w, te.CSI+te.SaveCursorPositionSeq)32}3334func restoreCursorPosition(w io.Writer) {35 fmt.Fprint(w, te.CSI+te.RestoreCursorPositionSeq)36}3730func changeScrollingRegion(w io.Writer, top, bottom int) {31 fmt.Fprintf(w, te.CSI+te.ChangeScrollingRegionSeq, top, bottom)32}33
3 unmodified lines