Skip to content

Conversation

@Jaehaks
Copy link

@Jaehaks Jaehaks commented Mar 22, 2025

When restoring after max_preview, revert to the min-preview state
To resolve #94

When restoring after max_preview, revert to the min-preview state
@sxyazi
Copy link
Member

sxyazi commented Mar 22, 2025

Thanks for the PR @Jaehaks!

I'd prefer not to add extra config. Is it possible to leverage the existing state to restore the view? When toggle-pane is called for the first time, its state should be saved to st.

@Jaehaks
Copy link
Author

Jaehaks commented Mar 22, 2025

This PR suggests returning to the reset state as the original behavior if we don't configure a default setup. Is that not enough?

@sxyazi
Copy link
Member

sxyazi commented Mar 22, 2025 via email

@Jaehaks
Copy link
Author

Jaehaks commented Mar 22, 2025

Ok i'll try it. please wait. i am not good at programming

1. Problem

- Back in the day, executing maximization again would always reset it to
  the default state laid out in the [manager] section of `yazi.toml`
- 301f971 commit needs to additional configuration to change reset state

2. Improvement

- Every minimization operation, it would save that state and then revert
  back to it after maximizing
@Jaehaks
Copy link
Author

Jaehaks commented Mar 23, 2025

@sxyazi
I commited second one, check please

`bf_state` declared in entry() to remove setup()
@sxyazi sxyazi force-pushed the main branch 2 times, most recently from 1ff5f8b to 4df8f70 Compare May 26, 2025 12:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature - toggle-pane.yazi] Toggle to previous preview state when max-preview is executed

2 participants