From 96ce49de011097982c90c7c66119263fa7813518 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karl=20Yngve=20Lerv=C3=A5g?= Date: Thu, 19 Jan 2017 22:04:58 +0100 Subject: [PATCH] Fixed #664: Regex matched too much --- autoload/vimtex/complete.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoload/vimtex/complete.vim b/autoload/vimtex/complete.vim index e6bf5be..ed8724c 100644 --- a/autoload/vimtex/complete.vim +++ b/autoload/vimtex/complete.vim @@ -411,7 +411,7 @@ function! s:img.get_graphicspaths() dict " {{{2 " Parse preamble for graphicspath command let l:graphicspath = matchstr(join(l:preamble, ' '), - \ '\\graphicspath{\s*{\s*\zs.*\ze\s*}\s*}') + \ '\\graphicspath{\s*{\s*\zs.\{-}\ze\s*}\s*}') let self.graphicspaths = map(split(l:graphicspath, '}\s*{'), \ 'v:val[0] ==# ''/'' ? v:val : simplify(b:vimtex.root . ''/'' . v:val)') endfunction