summaryrefslogtreecommitdiff
path: root/src/options.go
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2020-10-09 19:53:51 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2020-10-09 19:53:51 +0900
commitd9752a4c21ba8a98e26dcf2199f22581d3946dfa (patch)
treefc37e3e8e5cfe82b0f7e248966f91e51e7e3e335 /src/options.go
parentdba14d26303297322dc4426d38ebfbf1d76a6011 (diff)
downloadfzf-d9752a4c21ba8a98e26dcf2199f22581d3946dfa.tar.gz
Reset preview window flags that are not style-related
Fix #2203
Diffstat (limited to 'src/options.go')
-rw-r--r--src/options.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/options.go b/src/options.go
index 35220bae..c7354b35 100644
--- a/src/options.go
+++ b/src/options.go
@@ -994,6 +994,10 @@ func parseInfoStyle(str string) infoStyle {
}
func parsePreviewWindow(opts *previewOpts, input string) {
+ // We should reset flags that are not style-related.
+ opts.hidden = false
+ opts.scroll = ""
+
tokens := strings.Split(input, ":")
sizeRegex := regexp.MustCompile("^[0-9]+%?$")
offsetRegex := regexp.MustCompile("^\\+([0-9]+|{-?[0-9]+})(-[0-9]+|-/[1-9][0-9]*)?$")