mirror of
https://github.com/junegunn/fzf.git
synced 2025-11-15 06:43:47 -05:00
Fix the behavior of change-preview-window action (#3280)
* change-preview-window restores the initial preview window options, and overrides the properties that are specified * However, 'hidden' property is treated differently. It is set to 'false' if the specified properties of the action is non-empty. * cf. toggle-preview takes the "current" preview window options and toggles the 'hidden' property.
This commit is contained in:
@@ -3523,6 +3523,9 @@ func (t *Terminal) Loop() {
|
||||
|
||||
// Split window options
|
||||
tokens := strings.Split(a.a, "|")
|
||||
if len(tokens[0]) > 0 && t.initialPreviewOpts.hidden {
|
||||
t.previewOpts.hidden = false
|
||||
}
|
||||
parsePreviewWindow(&t.previewOpts, tokens[0])
|
||||
if len(tokens) > 1 {
|
||||
a.a = strings.Join(append(tokens[1:], tokens[0]), "|")
|
||||
|
||||
Reference in New Issue
Block a user