aboutsummaryrefslogtreecommitdiff
path: root/autoload
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2019-06-22 22:06:15 +1200
committerTom Ryder <tom@sanctum.geek.nz>2019-06-22 22:06:15 +1200
commit06eb698192dfa4ea64458aa1483d024d251e82ec (patch)
treeee09adabc78596a265494c1421a329d99858fc2f /autoload
parentMerge branch 'release/v1.0.0' (diff)
parentBump VERSION (diff)
downloadvim-digraph-search-master.tar.gz
vim-digraph-search-master.zip
Merge branch 'release/v1.1.0'HEADv1.1.0master
* release/v1.1.0: Remove unneeded pattern qualifier Find digraph help file a little more correctly
Diffstat (limited to 'autoload')
-rw-r--r--autoload/digraph_search.vim8
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