Skip to content
Myr

Put cursor back where we found it after scrolling

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

authored by Christian Rocha · committed by Christian Rocha · parent eff9929 · Browse files · 1 file+6 added−0 removed
This commit

State

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

Diff stats

1 file+6 added−0 removed

  • other:+6 added−0 removed

1 file+6 added−0 removed

modified:renderer.go+6 added
213 unmodified lines
214 insertLine(b, len(lines))215 _, _ = io.WriteString(b, strings.Join(lines, "\r\n"))216 changeScrollingRegion(b, 0, r.height)217218 // Move cursor back to where the main rendering routine expects it to be219 moveCursor(b, r.linesRendered, 0)220221 r.out.Write(b.Bytes())222}223224// insertBottom effectively scrolls down. It inserts lines at the bottom of
15 unmodified lines
240 moveCursor(b, bottomBoundary, 0)241 _, _ = io.WriteString(b, "\r\n"+strings.Join(lines, "\r\n"))242 changeScrollingRegion(b, 0, r.height)243244 // Move cursor back to where the main rendering routine expects it to be245 moveCursor(b, r.linesRendered, 0)246247 r.out.Write(b.Bytes())248}249250// handleMessages handles internal messages for the renderer.
107 unmodified lines