anuvyklack / windows.nvim

Automatically expand width of the current window. Maximizes and restore it. And all this with nice animations!
MIT License
537 stars 15 forks source link

Aerial width is not consistent #36

Open sho-87 opened 1 year ago

sho-87 commented 1 year ago

Aerial normally opens to the smallest width possible to fit the text, but with this plugin it sometimes opens it to half the screen width and sometimes its the correct size (usually when theres already a split open). Other times, when you move the cursor into the aerial window, the window resizes but the buffer doesn't update (not sure how to explain this)...

https://user-images.githubusercontent.com/5199715/224158973-20855323-1254-4a1c-b9d3-2c145d060581.mp4

This seems to be a problem with the autowidth option, which I prefer to keep enabled as thats one of the key features of this plugin for me. Things are fine without autowidth as there is nothing trying to change the aerial window size

I have tried adding aerial to the ignore section of the config but it doesn't seem to do anything?

Config: https://github.com/sho-87/dotfiles/blob/master/nvim/lua/plugins/modules/windows.lua Aerial config: https://github.com/sho-87/dotfiles/blob/master/nvim/lua/plugins/modules/aerial.lua

sho-87 commented 1 year ago

@anuvyklack is this because of the way the autocommands currently work? the ignore checks are happening in the autocommands and their events are tied to entering buffers/windows.

but for plugins like aerial, when you toggle an aerial window it gets created but the cursor does not enter the aerial window (not focused automatically) so it doesnt trigger the autocommand to check the ignore list?