m/fzf
1
0
mirror of https://github.com/junegunn/fzf.git synced 2025-11-14 14:23:47 -05:00

Allow negative field index in preview-window scroll offset

This commit is contained in:
Junegunn Choi
2020-07-27 00:30:25 +09:00
parent 0f9cb5590e
commit a61150a96c

View File

@@ -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 "":