We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e90cdeb commit b43fefdCopy full SHA for b43fefd
autoload/fern/internal/drawer/auto_resize.vim
@@ -18,13 +18,20 @@ function! fern#internal#drawer#auto_resize#init() abort
18
endif
19
endfunction
20
21
+function! s:count_others() abort
22
+ let bufnr = bufnr('%')
23
+ let bufnrs = map(range(0, winnr('$')), { -> winbufnr(v:val) })
24
+ call filter(bufnrs, { -> bufnr isnot# v:val })
25
+ return len(bufnrs)
26
+endfunction
27
+
28
if has('nvim')
29
function! s:should_ignore() abort
- return nvim_win_get_config(win_getid()).relative !=# ''
30
+ return nvim_win_get_config(win_getid()).relative !=# '' || s:count_others() is# 0
31
32
else
33
- return 0
34
+ return s:count_others() is# 0
35
36
37
0 commit comments