From dbf9623050b9b31360903c911d94b72f58601df8 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sat, 22 Jun 2019 22:05:15 +1200 Subject: Find digraph help file a little more correctly --- autoload/digraph_search.vim | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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) -- cgit v1.2.3