Allow invisible preview window (--preview-window 0)

Close #820
This commit is contained in:
Junegunn Choi
2017-01-24 00:23:16 +09:00
parent a3244c4892
commit 6a75e30941
5 changed files with 38 additions and 14 deletions

View File

@@ -823,7 +823,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]+%?$")
for _, token := range tokens {
switch token {
case "hidden":