Skip to content
Myr

Fix failing test case

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 82b4672 · Browse files · 2 files+7 added−6 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+7 added−6 removed

  • other:+7 added−6 removed

2 files+7 added−6 removed

modified:src/options.go+1 added
1245 unmodified lines
1246 }1247 if len(alternative) > 0 {1248 alternativeOpts := *opts1249 opts.alternative = &alternativeOpts1250 opts.alternative.hidden = false1251 opts.alternative.alternative = nil1252 parsePreviewWindow(opts.alternative, alternative)1253 }1254}
522 unmodified lines
modified:src/terminal.go+6 added-6 removed
875 unmodified lines
876 noBorder := tui.MakeBorderStyle(tui.BorderNone, t.unicode)877 if previewVisible {878 var resizePreviewWindows func(previewOpts previewOpts)879 resizePreviewWindows = func(previewOpts previewOpts) {880 if previewOpts.hidden {881 return882 }880 hasThreshold := previewOpts.threshold > 0 && previewOpts.alternative != nil881 createPreviewWindow := func(y int, x int, w int, h int) {882 pwidth := w883 pheight := h
42 unmodified lines
926 switch previewOpts.position {927 case posUp, posDown:928 pheight := calculateSize(height, previewOpts.size, minHeight, minPreviewHeight, verticalPad)929 if hasThreshold && pheight < previewOpts.threshold {930 if !previewOpts.alternative.hidden {933 resizePreviewWindows(*previewOpts.alternative)931 resizePreviewWindows(*previewOpts.alternative)932 }933 return934 }935 if previewOpts.position == posUp {936 t.window = t.tui.NewWindow(
6 unmodified lines
943 }944 case posLeft, posRight:945 pwidth := calculateSize(width, previewOpts.size, minWidth, 5, 4)946 if hasThreshold && pwidth < previewOpts.threshold {948 fmt.Println("Alternative", (*previewOpts.alternative).position == posDown)949 resizePreviewWindows(*previewOpts.alternative)947 if !previewOpts.alternative.hidden {948 resizePreviewWindows(*previewOpts.alternative)949 }950 return951 }952 if previewOpts.position == posLeft {953 t.window = t.tui.NewWindow(
1984 unmodified lines