lens.vim
lens.vim copied to clipboard
lens.vim stretches windows opened via FZF
When you open a new vertically split window through FZF, lens.vim stretches that window to maximal allowed width.
I've created a minimal example at https://github.com/gregorias/lens.vim-fzf-issue that reproduces this issue. I've also recorded an example.
The expected behavior would be for lens.vim to open the new window in an equal vertical split (or just not resize the window).
The reason why this happens is that two WinEnter
events happen when FZF does a split. During the first enter (i.e., FZF just returns to the original window), the target window is at full width and lens.vim starts animating. Then FZF opens a new window, and, when the second WinEnter
happens, the target window has the proper width (equally split across both windows) but the started animation prevents lens.vim from adjusting (there's an explicit if: https://github.com/camspiers/lens.vim/blob/master/plugin/lens.vim#L132).
I also see this behaviour when opening files with floaterm's ranger wrapper.
Marking as abandoned.