mirror of
https://github.com/Llewellynvdm/fzf.git
synced 2025-01-23 15:18:29 +00:00
Disallow preview-window size of zero
This commit is contained in:
parent
e2ae1b249c
commit
1ab4289ad6
@ -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…
x
Reference in New Issue
Block a user