diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2019-06-22 22:05:15 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2019-06-22 22:05:15 +1200 |
commit | dbf9623050b9b31360903c911d94b72f58601df8 (patch) | |
tree | dbb5e66b9b87fb4da02b304470c4bd02586a3da9 | |
parent | Merge branch 'release/v1.0.0' into develop (diff) | |
download | vim-digraph-search-dbf9623050b9b31360903c911d94b72f58601df8.tar.gz vim-digraph-search-dbf9623050b9b31360903c911d94b72f58601df8.zip |
Find digraph help file a little more correctly
-rw-r--r-- | autoload/digraph_search.vim | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/autoload/digraph_search.vim b/autoload/digraph_search.vim index bae4973..d342f38 100644 --- a/autoload/digraph_search.vim +++ b/autoload/digraph_search.vim @@ -37,7 +37,11 @@ function! s:Digraphs() abort if !exists('s:digraphs') let s:digraphs = [] let table = 0 - for line in readfile($VIMRUNTIME.'/doc/digraph.txt') + let file = globpath(&runtimepath, 'doc/digraph.txt') + if !strlen(file) + echoerr 'Help file missing' + endif + for line in readfile(file) " Flag whether we're in one of the digraph tables; look for the heading let table = table && strlen(line) |