diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2017-08-20 22:17:03 +0200 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2017-08-20 22:17:03 +0200 |
commit | 88165a798e7459fecf815a13c853949923d4b278 (patch) | |
tree | 63cda34cb93df36f64be4beea934ee34d850104c /runtime/autoload | |
parent | cc7e344f8357d07b1df17df0b322152d5c50739b (diff) | |
download | rneovim-88165a798e7459fecf815a13c853949923d4b278.tar.gz rneovim-88165a798e7459fecf815a13c853949923d4b278.tar.bz2 rneovim-88165a798e7459fecf815a13c853949923d4b278.zip |
clipboard: test g:clipboard validation, fix a bug
Also fix `:help foo` highlighting in health.vim
Diffstat (limited to 'runtime/autoload')
-rw-r--r-- | runtime/autoload/health.vim | 2 | ||||
-rw-r--r-- | runtime/autoload/provider/clipboard.vim | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/runtime/autoload/health.vim b/runtime/autoload/health.vim index f875c8b797..bd99a0e104 100644 --- a/runtime/autoload/health.vim +++ b/runtime/autoload/health.vim @@ -90,7 +90,7 @@ endfunction " Changes ':h clipboard' to ':help |clipboard|'. function! s:help_to_link(s) abort - return substitute(a:s, '\v:h%[elp] ([^|][^"\r\n]+)', ':help |\1|', 'g') + return substitute(a:s, '\v:h%[elp] ([^|][^"\r\n ]+)', ':help |\1|', 'g') endfunction " Format a message for a specific report item diff --git a/runtime/autoload/provider/clipboard.vim b/runtime/autoload/provider/clipboard.vim index 0d36dfcf78..8fe53c495a 100644 --- a/runtime/autoload/provider/clipboard.vim +++ b/runtime/autoload/provider/clipboard.vim @@ -57,14 +57,14 @@ endfunction function! provider#clipboard#Executable() abort if exists('g:clipboard') if type({}) isnot# type(g:clipboard) - \ || type({}) isnot# get(g:clipboard, 'copy', v:null) - \ || type({}) isnot# get(g:clipboard, 'paste', v:null) + \ || type({}) isnot# type(get(g:clipboard, 'copy', v:null)) + \ || type({}) isnot# type(get(g:clipboard, 'paste', v:null)) let s:err = 'clipboard: invalid g:clipboard' return '' endif let s:copy = get(g:clipboard, 'copy', { '+': v:null, '*': v:null }) let s:paste = get(g:clipboard, 'paste', { '+': v:null, '*': v:null }) - let s:cache_enabled = get(g:clipboard, 'cache_enabled', 1) + let s:cache_enabled = get(g:clipboard, 'cache_enabled', 0) return get(g:clipboard, 'name', 'g:clipboard') elseif has('mac') && executable('pbcopy') let s:copy['+'] = 'pbcopy' |