Skip to content
Myr

Fix invalid memory access when the preview window becomes hidden

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

authored by Junegunn Choi · committed by Junegunn Choi · parent 0cc27c3 · Browse files · 1 file+1 added−1 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+1 added−1 removed

  • other:+1 added−1 removed

1 file+1 added−1 removed

modified:src/terminal.go+1 added-1 removed
3159 unmodified lines
3160 }3161 }3162 t.previewer.lines = result.lines3163 t.previewer.spinner = result.spinner3164 if t.previewer.following.Enabled() {3164 if t.hasPreviewWindow() && t.previewer.following.Enabled() {3165 t.previewer.offset = util.Max(t.previewer.offset, len(t.previewer.lines)-(t.pwindow.Height()-t.previewOpts.headerLines))3166 } else if result.offset >= 0 {3167 t.previewer.offset = util.Constrain(result.offset, t.previewOpts.headerLines, len(t.previewer.lines)-1)3168 }
1039 unmodified lines