summaryrefslogtreecommitdiff
path: root/src/options.go
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2020-08-23 15:57:49 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2020-08-23 15:57:49 +0900
commit1cb19dbf65590ffe44b60ac4d5ff7a957de0628f (patch)
tree9747349c9d5755a08c7c98641f95eedece6f9289 /src/options.go
parent1ab4289ad64a60a88c44dcfe7d032c5d028df6bf (diff)
downloadfzf-1cb19dbf65590ffe44b60ac4d5ff7a957de0628f.tar.gz
Support preview scroll offset relative to window height
Related: https://github.com/junegunn/fzf.vim/issues/1092
Diffstat (limited to 'src/options.go')
-rw-r--r--src/options.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/options.go b/src/options.go
index 699e8a55..a916e806 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("^[1-9][0-9]*%?$")
- offsetRegex := regexp.MustCompile("^\\+([0-9]+|{-?[0-9]+})(-[0-9]+)?$")
+ offsetRegex := regexp.MustCompile("^\\+([0-9]+|{-?[0-9]+})(-[0-9]+|-/[1-9][0-9]*)?$")
for _, token := range tokens {
switch token {
case "":