Skip to content

Commit 747b289

Browse files
committed
Forecdly refer autoload variable to fix #111
1 parent 05d5ed8 commit 747b289

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

autoload/fern/internal/scheme.vim

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,13 @@ function! fern#internal#scheme#provider_new(scheme) abort
1111
endfunction
1212

1313
function! fern#internal#scheme#mapping_init(scheme, disable_default_mappings) abort
14-
let mappings = get(g:, printf('fern#scheme#%s#mapping#mappings', a:scheme), [])
15-
for name in mappings
16-
call s:call(a:scheme, printf('mapping#%s#init', name), a:disable_default_mappings)
17-
endfor
18-
return s:call(a:scheme, 'mapping#init', a:disable_default_mappings)
14+
call s:call(a:scheme, 'mapping#init', a:disable_default_mappings)
15+
try
16+
for name in g:fern#scheme#{a:scheme}#mapping#mappings
17+
call s:call(a:scheme, printf('mapping#%s#init', name), a:disable_default_mappings)
18+
endfor
19+
catch /^Vim\%((\a\+)\)\=:E121:/
20+
endtry
1921
endfunction
2022

2123
function! fern#internal#scheme#complete_url(scheme, arglead, cmdline, cursorpos) abort

0 commit comments

Comments
 (0)