mirror of
https://github.com/Llewellynvdm/fzf.git
synced 2025-01-23 23:28:31 +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
|
opts.wrap = false
|
||||||
|
|
||||||
tokens := strings.Split(input, ":")
|
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]+)?$")
|
offsetRegex := regexp.MustCompile("^\\+([0-9]+|{-?[0-9]+})(-[0-9]+)?$")
|
||||||
for _, token := range tokens {
|
for _, token := range tokens {
|
||||||
switch token {
|
switch token {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user