diff options
author | Junegunn Choi <junegunn.c@gmail.com> | 2020-07-27 00:30:25 +0900 |
---|---|---|
committer | Junegunn Choi <junegunn.c@gmail.com> | 2020-07-27 00:30:25 +0900 |
commit | a61150a96c0bc32d0c56e1127985ca238b1b89ff (patch) | |
tree | d75020285333bc47850dd4bc00110598663b0e05 | |
parent | 0f9cb5590ec0a397143a7a4caf003a54885f4375 (diff) |
Allow negative field index in preview-window scroll offset
-rw-r--r-- | src/options.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/options.go b/src/options.go index 811615eb..3692f0c3 100644 --- a/src/options.go +++ b/src/options.go @@ -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 "": |