mirror of
https://github.com/Llewellynvdm/fzf.git
synced 2025-02-14 09:50:25 +00:00
Allow negative field index in preview-window scroll offset
This commit is contained in:
parent
0f9cb5590e
commit
a61150a96c
@ -995,7 +995,7 @@ func parsePreviewWindow(opts *previewOpts, input string) {
|
|||||||
|
|
||||||
tokens := strings.Split(input, ":")
|
tokens := strings.Split(input, ":")
|
||||||
sizeRegex := regexp.MustCompile("^[0-9]+%?$")
|
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 {
|
for _, token := range tokens {
|
||||||
switch token {
|
switch token {
|
||||||
case "":
|
case "":
|
||||||
|
Loading…
x
Reference in New Issue
Block a user