Skip to content
Myr

Revert 1ab4289: Preview window of size 0 is allowed

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 9dc4b40 · Browse files · 2 files+4 added−3 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+4 added−3 removed

  • other:+4 added−3 removed

2 files+4 added−3 removed

modified:src/options.go+1 added-1 removed
993 unmodified lines
994 opts.hidden = false995 opts.wrap = false996997 tokens := strings.Split(input, ":")998 sizeRegex := regexp.MustCompile("^[1-9][0-9]*%?$")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 {1001 switch token {1002 case "":
488 unmodified lines
modified:src/terminal.go+3 added-2 removed
1695 unmodified lines
1696 })1697 // We don't display preview window if no match1698 if items[0] != nil {1699 command := t.replacePlaceholder(commandTemplate, false, string(t.Input()), items)1700 height := t.pwindow.Height()1701 offset := t.evaluateScrollOffset(items, height)1700 offset := 01701 cmd := util.ExecCommand(command, true)1702 if t.pwindow != nil {1703 height := t.pwindow.Height()1704 offset = t.evaluateScrollOffset(items, height)1705 env := os.Environ()1706 lines := fmt.Sprintf("LINES=%d", height)1707 columns := fmt.Sprintf("COLUMNS=%d", t.pwindow.Width())1708 env = append(env, lines)
651 unmodified lines