Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: save and restore fixed win dimensions on resize #136

Merged
merged 1 commit into from
Oct 5, 2023

Conversation

willothy
Copy link
Collaborator

@willothy willothy commented Oct 3, 2023

There is occasionally some flicker when switching windows, when some windows sizes are fixed (neo-tree, edgy.nvim, etc.), as Focus tries to resize them even if they are disabled when a neighboring window is resized.

This PR addresses this issue by saving and restoring the window dimensions of all disabled windows when resizing, ensuring that the layout stays consistent.

This makes a huge difference in some cases, and pretty much eliminates flickering entirely. It also solves the issue (#114) of windows being resized by their neighbors when they shouldn't be (without using vim.fn.winlayout()!), allowing for more predictable resize behavior overall.

closes #114

@cryptomilk
Copy link
Collaborator

Loogs good, thanks!

@cryptomilk cryptomilk merged commit c83be53 into nvim-focus:master Oct 5, 2023
6 checks passed
@willothy
Copy link
Collaborator Author

willothy commented Oct 5, 2023

Awesome!

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/Fix] Check window layout to determine if neighboring windows can be resized
2 participants