Disallow preview-window size of zero

pull/2150/head
Junegunn Choi 4 years ago
parent e2ae1b249c
commit 1ab4289ad6
No known key found for this signature in database
GPG Key ID: 254BC280FEF9C627

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

Loading…
Cancel
Save