diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2017-07-15 15:03:41 +0200 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2017-07-15 15:19:01 +0200 |
commit | 72c38b5cd5af8599090311f8d580136feb0646f1 (patch) | |
tree | d6b5adbcd646f09afe5107da673a87b369336ede | |
parent | e2216724cec4138e035143d66fea627e873aad35 (diff) | |
download | rneovim-72c38b5cd5af8599090311f8d580136feb0646f1.tar.gz rneovim-72c38b5cd5af8599090311f8d580136feb0646f1.tar.bz2 rneovim-72c38b5cd5af8599090311f8d580136feb0646f1.zip |
health.vim: validate g:clipboard
Closes #7020
Also fix 'iskeyword' setting, which I fumbled in
440133e0d5d576e46bd5ffa555f6a9c534789b48
-rw-r--r-- | runtime/autoload/health.vim | 3 | ||||
-rw-r--r-- | runtime/autoload/health/provider.vim | 4 |
2 files changed, 6 insertions, 1 deletions
diff --git a/runtime/autoload/health.vim b/runtime/autoload/health.vim index 1d8cae7d19..f875c8b797 100644 --- a/runtime/autoload/health.vim +++ b/runtime/autoload/health.vim @@ -33,7 +33,8 @@ function! health#check(plugin_names) abort setlocal wrap breakindent setlocal filetype=markdown setlocal conceallevel=2 concealcursor=nc - setlocal keywordprg=:help iskeyword=@,48-57,_,192-255,-,# + setlocal keywordprg=:help + let &l:iskeyword='!-~,^*,^|,^",192-255' call s:enhance_syntax() if empty(healthchecks) diff --git a/runtime/autoload/health/provider.vim b/runtime/autoload/health/provider.vim index 31a235a397..ec20615f69 100644 --- a/runtime/autoload/health/provider.vim +++ b/runtime/autoload/health/provider.vim @@ -125,6 +125,10 @@ function! s:check_clipboard() abort call health#report_warn( \ 'No clipboard tool found. Clipboard registers will not work.', \ [':help clipboard']) + elseif exists('g:clipboard') && (type({}) != type(g:clipboard) + \ || !has_key(g:clipboard, 'copy') || !has_key(g:clipboard, 'paste')) + call health#report_error( + \ 'g:clipboard exists but is malformed. It must be a dictionary with the keys documented at :help g:clipboard') else call health#report_ok('Clipboard tool found: '. clipboard_tool) endif |