Skip to content

Commit b7aeb69

Browse files
demonyeheavenshell
authored andcommitted
Solved exception: Template does not exist (#32)
For some reason, I added set wildignore=*.txt in my vimrc, which caused expand('/path/to/file.txt') failure, so only expand tmpldir instead of full path.
1 parent 1bd96bb commit b7aeb69

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

autoload/pydocstring.vim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ function! s:readtmpl(type)
3535
let tmpldir = tmpldir . '/'
3636
endif
3737

38-
let path = expand(tmpldir . a:type . '.txt')
38+
let path = expand(tmpldir) . a:type . '.txt'
3939
if !filereadable(path)
40-
throw 'Template ' . path . ' is not exists.'
40+
throw 'Template ' . path . ' does not exist.'
4141
endif
4242
let tmpl = readfile(path, 'b')
4343
return tmpl

0 commit comments

Comments
 (0)