Fixed #679: Foldtext for indented single_opt

This commit is contained in:
Karl Yngve Lervåg 2017-02-09 21:42:18 +01:00
parent d57b7720f8
commit 9ef8463dae

View File

@ -430,8 +430,9 @@ function! s:cmd_single_opt(cmds) " {{{1
endfunction endfunction
function! l:fold.text(line) dict function! l:fold.text(line) dict
let l:col = strlen(matchstr(a:line, '^\s*')) + 1
return matchstr(a:line, self.re.text) . '[...]{' 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 endfunction
return l:fold return l:fold