lambdalisue/vim-fern

Unexpeced drawer width is saved

asmka opened this issue · 1 comments

asmka commented

Abstract

Drawer width is overwritten when all windows except for drawer are quit .

Minimal settings

g:fern#disable_drawer_smart_quit = 1

Reproduce

2022-06-18.15-20-50.mp4

Info

This is because s:save_width() is invoked since the left full window is treated as drawer.
https://github.com/lambdalisue/fern.vim/blob/951a05d3f6ebc785db728ccfdf1759a2cf7c15ff/autoload/fern/internal/drawer/auto_resize.vim#L15-L16

I have no smart idea.

Alternatively, this is resolved if g:fern#disable_drawer_save_width option exists.
If this option is enabled, :Fern . -drawer [-width={width}] always uses g:fern#drawer_width or {width} as width.

asmka commented

Thank you so much! 🙇