diff options
Diffstat (limited to 'autoload/digraph_search.vim')
-rw-r--r-- | autoload/digraph_search.vim | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/autoload/digraph_search.vim b/autoload/digraph_search.vim index bae4973..1a9dc92 100644 --- a/autoload/digraph_search.vim +++ b/autoload/digraph_search.vim @@ -37,11 +37,15 @@ 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) - \ || line =~# '\C\*digraph-table\%(-mbyte\)\=\*$' + \ || line =~# '\*digraph-table\%(-mbyte\)\=\*$' " Skip to next line if not in a table if !table continue |