File tree Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -3,12 +3,13 @@ if exists('g:loaded_fern_hijack') || ( !has('nvim') && v:version < 801 )
33endif
44let g: loaded_fern_hijack = 1
55
6- function ! s: hijack_directory (path ) abort
7- if ! isdirectory (a: path )
6+ function ! s: hijack_directory () abort
7+ let path = s: expand (' %:p' )
8+ if ! isdirectory (path )
89 return
910 endif
1011 let bufnr = bufnr ()
11- execute printf (' keepjumps keepalt Fern %s' , fnameescape (a: path ))
12+ execute printf (' keepjumps keepalt Fern %s' , fnameescape (path ))
1213 execute printf (' silent! bwipeout %d' , bufnr )
1314endfunction
1415
@@ -26,13 +27,8 @@ function! s:expand(expr) abort
2627 endtry
2728endfunction
2829
29- function ! s: initial_hijack () abort
30- call s: hijack_directory (expand (' %:p' ))
31- autocmd fern- hijack BufEnter * ++ nested call s: hijack_directory (s: expand (' %:p' ))
32- endfunction
33-
3430augroup fern - hijack
3531 autocmd !
3632 autocmd VimEnter * call s: suppress_netrw ()
37- autocmd BufEnter * ++once ++ nested call s: initial_hijack ()
33+ autocmd BufEnter * ++nested call s: hijack_directory ()
3834augroup END
You can’t perform that action at this time.
0 commit comments