diff options
Diffstat (limited to 'runtime/autoload')
-rw-r--r-- | runtime/autoload/freebasic.vim | 3 | ||||
-rw-r--r-- | runtime/autoload/health.vim | 9 |
2 files changed, 9 insertions, 3 deletions
diff --git a/runtime/autoload/freebasic.vim b/runtime/autoload/freebasic.vim index fe6d2745be..428cf1382b 100644 --- a/runtime/autoload/freebasic.vim +++ b/runtime/autoload/freebasic.vim @@ -23,8 +23,7 @@ function! freebasic#GetDialect() abort let save_cursor = getcurpos() call cursor(1, 1) - " let lnum = search(pat, 'n', '', '', skip) " 'skip' needs 8.2.0915 - let lnum = search(pat, 'n', '', '') + let lnum = search(pat, 'n', '', '', skip) call setpos('.', save_cursor) if lnum diff --git a/runtime/autoload/health.vim b/runtime/autoload/health.vim index 1d462ad02c..ec030adf04 100644 --- a/runtime/autoload/health.vim +++ b/runtime/autoload/health.vim @@ -21,10 +21,17 @@ function! health#check(plugin_names) abort throw 'healthcheck_not_found' endif eval type == 'v' ? call(func, []) : luaeval(func) + " in the event the healthcheck doesn't return anything + " (the plugin author should avoid this possibility) + if len(s:output) == 0 + throw 'healthcheck_no_return_value' + endif catch let s:output = [] " Clear the output if v:exception =~# 'healthcheck_not_found' call health#report_error('No healthcheck found for "'.name.'" plugin.') + elseif v:exception =~# 'healthcheck_no_return_value' + call health#report_error('The healthcheck report for "'.name.'" plugin is empty.') else call health#report_error(printf( \ "Failed to run healthcheck for \"%s\" plugin. Exception:\n%s\n%s", @@ -127,7 +134,7 @@ endfunction " }}} " From a path return a list [{name}, {func}, {type}] representing a healthcheck function! s:filepath_to_healthcheck(path) abort - if a:path =~# 'vim$' + if a:path =~# 'vim$' let name = matchstr(a:path, '\zs[^\/]*\ze\.vim$') let func = 'health#'.name.'#check' let type = 'v' |