From 9ef8463dae9168cdea56592f16c9c055507df94a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karl=20Yngve=20Lerv=C3=A5g?= Date: Thu, 9 Feb 2017 21:42:18 +0100 Subject: [PATCH] Fixed #679: Foldtext for indented single_opt --- autoload/vimtex/fold.vim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/autoload/vimtex/fold.vim b/autoload/vimtex/fold.vim index 7f24733..4b951c8 100644 --- a/autoload/vimtex/fold.vim +++ b/autoload/vimtex/fold.vim @@ -430,8 +430,9 @@ function! s:cmd_single_opt(cmds) " {{{1 endfunction function! l:fold.text(line) dict + let l:col = strlen(matchstr(a:line, '^\s*')) + 1 return matchstr(a:line, self.re.text) . '[...]{' - \ . vimtex#cmd#get_at(v:foldstart, 1).args[0].text . '}' + \ . vimtex#cmd#get_at(v:foldstart, l:col).args[0].text . '}' endfunction return l:fold