nvim-focus/focus.nvim

Golden ration stops working after :FocusEqualise

Opened this issue · 4 comments

since I updated the today there seems to be alot of bugs. There was a refactoring lately which seems to have broken a few things and one of them is after a equalise the windows the golden ration seems to not work anymore.

I'm sorry but I don't understand what exactly is the issue. Can you provide more detailed steps how to reproduce this? We need to write tests for more scenarios or we keep breaking them. Contributions are also welcome ;-)

I was going to make a few PRs for some fixes but as you know... I got some code to deliver, maybe after I will look into it.

So, after I use the FocusMaxOrEqual the golden ration seems to not work anymore (the windows don't adjust to different sizes anymore)

hopefully that makes sense.

Ah, I see what you mean, the size check doesn't occur each time a new split is added or the window is resized. Will submit a PR for this soon.

Actually, I think the above is the intended behavior - MaxOrEqual either enables maximize or equalize modes based on the size of the current window. @cryptomilk mind confirming this?

If other behavior is wanted, it should likely be added as an additional feature.

However, it is true that autoresize breaks after max_or_equal. Working on a fix now.

For now, you can use FocusAutoresize to return to golden ratio mode.

Edit: Autoresize actually works fine for me after maximize, it was just an issue with my keymap lol. Not sure what the issue is here. I think you may just not be using FocusAutoresize or require("focus").focus_autoresize() to return to golden ratio mode.

This should be fixed by #128, let me know if it wasn't.