diff options
| author | jaydee-coder <187227976+jaydee-coder@users.noreply.github.com> | 2024-11-04 05:27:59 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-11-04 22:27:59 +0900 |
| commit | d4d9b99879d7f870264d4e2e9358c81b5e59981d (patch) | |
| tree | 657caf8396cd703efe7aa29b16662c8cb3b11355 /src | |
| parent | 6816b7d95b54330224020b4304db7fd5a5ea1ba1 (diff) | |
| download | fzf-d4d9b99879d7f870264d4e2e9358c81b5e59981d.tar.gz | |
Allow specifying '{n}' as the OFFSET in the preview-window flag (#4079)
* fzf: Allow '{n}' to be used as the OFFSET in the preview-window flag
* man: Document using '{n}' as the OFFSET in the preview-window flag
Diffstat (limited to 'src')
| -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 b0ab6b1d..c42acce3 100644 --- a/src/options.go +++ b/src/options.go @@ -1726,7 +1726,7 @@ func parsePreviewWindowImpl(opts *previewOpts, input string) error { var err error tokenRegex := regexp.MustCompile(`[:,]*(<([1-9][0-9]*)\(([^)<]+)\)|[^,:]+)`) sizeRegex := regexp.MustCompile("^[0-9]+%?$") - offsetRegex := regexp.MustCompile(`^(\+{-?[0-9]+})?([+-][0-9]+)*(-?/[1-9][0-9]*)?$`) + offsetRegex := regexp.MustCompile(`^(\+{(-?[0-9]+|n)})?([+-][0-9]+)*(-?/[1-9][0-9]*)?$`) headerRegex := regexp.MustCompile("^~(0|[1-9][0-9]*)$") tokens := tokenRegex.FindAllStringSubmatch(input, -1) var alternative string |
