Allow negative field index in preview-window scroll offset

pull/2121/head
Junegunn Choi 4 years ago
parent 0f9cb5590e
commit a61150a96c
No known key found for this signature in database
GPG Key ID: 254BC280FEF9C627

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

Loading…
Cancel
Save