Skip to content
Myr

Fix infinte loop + backwards ignore behavior

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 683473c · Browse files · 1 file+2 added−2 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+2 added−2 removed

  • other:+2 added−2 removed

1 file+2 added−2 removed

modified:renderer.go+2 added-2 removed
145 unmodified lines
146 defer r.mtx.Unlock()147148 if r.linesRendered > 0 {149 // Clear the lines we painted in the last render.150 for i := r.linesRendered; i >= 0; i++ {150 for i := r.linesRendered; i > 0; i-- {151 // Check and see if we should skip rendering for this line. That152 // includes clearing the line, which we normally do before a153 // render.154 if _, exists := r.ignoreLines[i]; !exists {
4 unmodified lines
159 }160 r.linesRendered = 0161162 for _, b := range r.buf.Bytes() {163 if _, exists := r.ignoreLines[r.linesRendered]; !exists {163 if _, exists := r.ignoreLines[r.linesRendered]; exists {164 cursorDown(out) // skip rendering for this line.165 r.linesRendered++166 } else if b == '\n' {167 out.Write([]byte("\r\n"))
93 unmodified lines