-
-
Notifications
You must be signed in to change notification settings - Fork 51
Description
Hi,
I typically open fern with noremap <silent> <Leader>f :Fern . -drawer -reveal=% -toggle -width=35<CR><C-w>=
Steps to reproduce potential issue:
- Toggle fern open using the above mapping
- It will open at its correct size (working as intended)
- You manually resize fern by making it bigger or smaller
- You click into a code buffer that isn't fern
- You click back into fern
At this point fern will revert the customize size you manually dragged fern to and resize it based on your mapping.
This is problematic for me as someone who creates video recorded content. I often find myself wanting to make fern a little bit wider so I can see the full file name (this changes based on the length of file name), but every time I click back into the code and then back into fern, fern snaps to its original size and then I need to manually make it wider again. I had to do this manual resize "fix" about 10 times in a 5 minute video while jumping between files and explaining stuff.
Would it be possible to write a rule that says "if fern is already open and visible, do not adjust the size to the configured -width, instead leave it at whatever width it's currently at". And if fern is closed and toggling to be opened it would work as it does now and correctly open at your configured -width.