checkhealth: fix problem where &shada is empty

fixes #13700
This commit is contained in:
erw7
2021-01-06 12:14:57 +09:00
parent 2ea3127697
commit b77e21b35c

View File

@@ -42,7 +42,7 @@ function! s:check_config() abort
endif
let writeable = v:true
let shadafile = substitute(matchstr(
let shadafile = empty(&shada) ? &shada : substitute(matchstr(
\ split(&shada, ',')[-1], '^n.\+'), '^n', '', '')
let shadafile = empty(&shadafile) ? empty(shadafile) ?
\ stdpath('data').'/shada/main.shada' : expand(shadafile)