Skip to content
Myr

Make sure preview command is not run before Terminal is ready

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 a2d0e8f · Browse files · 1 file+8 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+8 added−0 removed

  • other:+8 added−0 removed

1 file+8 added−0 removed

modified:src/terminal.go+8 added
380 unmodified lines
381 reqRedrawBorderLabel382 reqRedrawPreviewLabel383 reqClose384 reqPrintQuery385 reqPreviewReady386 reqPreviewEnqueue387 reqPreviewDisplay388 reqPreviewRefresh389 reqPreviewDelayed
3079 unmodified lines
3469 if t.hasPreviewer() {3470 go func() {3471 var version int643472 stop := false3473 t.previewBox.WaitFor(reqPreviewReady)3474 for {3475 var items []*Item3476 var commandTemplate string3477 var pwindow tui.Window
20 unmodified lines
3498 })3499 if stop {3500 break3501 }3502 if items == nil {3503 continue3504 }3505 version++3506 // We don't display preview window if no match3507 if items[0] != nil {3508 _, query := t.Input()
233 unmodified lines
3742 case reqHeader:3743 t.printHeader()3744 case reqActivate:3745 t.suppress = false3746 if t.hasPreviewer() {3747 t.previewBox.Set(reqPreviewReady, nil)3748 }3749 case reqRedrawBorderLabel:3750 t.printLabel(t.border, t.borderLabel, t.borderLabelOpts, t.borderLabelLen, t.borderShape, true)3751 case reqRedrawPreviewLabel:3752 t.printLabel(t.pborder, t.previewLabel, t.previewLabelOpts, t.previewLabelLen, t.previewOpts.border, true)
1294 unmodified lines