Reset preview window flags that are not style-related

Fix #2203
This commit is contained in:
Junegunn Choi
2020-10-09 19:53:51 +09:00
parent dba14d2630
commit d9752a4c21
4 changed files with 41 additions and 14 deletions

View File

@@ -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]*)?$")