diff --git a/autoload/wiki/link.vim b/autoload/wiki/link.vim index 50bba000..9db1fc03 100644 --- a/autoload/wiki/link.vim +++ b/autoload/wiki/link.vim @@ -77,6 +77,7 @@ endfunction " }}}1 function! wiki#link#follow(...) abort "{{{1 let l:link = wiki#link#get() + if empty(l:link) | return | endif try if has_key(l:link, 'follow') diff --git a/autoload/wiki/template.vim b/autoload/wiki/template.vim index a8142eca..9274062d 100644 --- a/autoload/wiki/template.vim +++ b/autoload/wiki/template.vim @@ -93,7 +93,7 @@ function! s:template_apply(t, ctx) abort " {{{1 let l:lines = l:pre . l:value . l:post let [l:match, l:c1, l:c2] = matchstrpos( - \ l:lines, '{{[a-zA-Z#_0-9]\+\s*[^}]*}}', l:c2+1) + \ l:lines, '{{[a-zA-Z#_0-9]\+\s*[^}]*}}', l:c1) endwhile call append(0, split(l:lines, "\n"))