Skip to content
Myr

Allow splitting preview-window options

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

e.g. --preview-window sharp --preview-window cycle

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

  • other:+0 added−7 removed

1 file+0 added−7 removed

modified:src/options.go-7 removed
992 unmodified lines
993 return infoDefault994}995996func parsePreviewWindow(opts *previewOpts, input string) {997 // Default998 opts.position = posRight999 opts.size = sizeSpec{50, true}1000 opts.hidden = false1001 opts.wrap = false1002 opts.cycle = false1003997 tokens := strings.Split(input, ":")998 sizeRegex := regexp.MustCompile("^[0-9]+%?$")999 offsetRegex := regexp.MustCompile("^\\+([0-9]+|{-?[0-9]+})(-[0-9]+|-/[1-9][0-9]*)?$")1000 for _, token := range tokens {
492 unmodified lines