Revert 1ab4289: Preview window of size 0 is allowed

This commit is contained in:
Junegunn Choi
2020-08-23 17:12:37 +09:00
parent 9dc4b40d7a
commit 43798fc2e8
2 changed files with 4 additions and 3 deletions

View File

@@ -995,7 +995,7 @@ func parsePreviewWindow(opts *previewOpts, input string) {
opts.wrap = false
tokens := strings.Split(input, ":")
sizeRegex := regexp.MustCompile("^[1-9][0-9]*%?$")
sizeRegex := regexp.MustCompile("^[0-9]+%?$")
offsetRegex := regexp.MustCompile("^\\+([0-9]+|{-?[0-9]+})(-[0-9]+|-/[1-9][0-9]*)?$")
for _, token := range tokens {
switch token {