Skip to content

Commit

Permalink
Forecdly refer autoload variable to fix #111
Browse files Browse the repository at this point in the history
  • Loading branch information
lambdalisue committed Aug 3, 2020
1 parent 05d5ed8 commit 747b289
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions autoload/fern/internal/scheme.vim
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,13 @@ function! fern#internal#scheme#provider_new(scheme) abort
endfunction

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

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

0 comments on commit 747b289

Please sign in to comment.