diff options
author | Junegunn Choi <junegunn.c@gmail.com> | 2023-05-05 15:08:08 +0900 |
---|---|---|
committer | Junegunn Choi <junegunn.c@gmail.com> | 2023-05-05 15:33:03 +0900 |
commit | 94999101e358385f3ca67a6ec9512f549196b802 (patch) | |
tree | 1b2bab23c86aeaa4aaaceb95396e22a113e2c7f7 /src/terminal.go | |
parent | e619b7c4f4e0da09b87a239b8f52ad909bb5f1e0 (diff) |
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.
Diffstat (limited to 'src/terminal.go')
-rw-r--r-- | src/terminal.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/terminal.go b/src/terminal.go index 1b44bf3e..d108bfd9 100644 --- a/src/terminal.go +++ b/src/terminal.go @@ -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]), "|") |