From 747b289133ddea05b788ff00ad03fc1224ada9c6 Mon Sep 17 00:00:00 2001 From: lambdalisue Date: Tue, 4 Aug 2020 03:19:32 +0900 Subject: [PATCH] Forecdly refer autoload variable to fix #111 --- autoload/fern/internal/scheme.vim | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/autoload/fern/internal/scheme.vim b/autoload/fern/internal/scheme.vim index 7ab90c92..314e5aec 100644 --- a/autoload/fern/internal/scheme.vim +++ b/autoload/fern/internal/scheme.vim @@ -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