Support preview scroll offset relative to window height

Related: https://github.com/junegunn/fzf.vim/issues/1092
This commit is contained in:
Junegunn Choi committed 2020-08-23 15:57:49 +09:00
1 parent 1ab4289ad6
commit 1cb19dbf65
4 files changed
+32 -7

No files matched your search

+1 -1
View File
@@ -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 "":