diff --git a/autoload/vimwiki/diary.vim b/autoload/vimwiki/diary.vim index 5706285..45760ae 100644 --- a/autoload/vimwiki/diary.vim +++ b/autoload/vimwiki/diary.vim @@ -363,14 +363,15 @@ function! vimwiki#diary#generate_diary_section() " file and multiple H1 headers will be indented by shiftwidth call add(lines, repeat(' ', vimwiki#lst#get_list_margin()).bullet.entry) + let startindent = repeat(' ', vimwiki#lst#get_list_margin()) + let indentstring = repeat(' ', vimwiki#u#sw()) + for [depth, subcap] in captions['rest'] if empty(subcap) continue endif let entry = substitute(link_tpl, '__LinkUrl__', fl.'#'.subcap, '') let entry = substitute(entry, '__LinkDescription__', subcap, '') - let startindent = repeat(' ', vimwiki#lst#get_list_margin()) - let indentstring = repeat(' ', vimwiki#u#sw()) " if single H1 then depth H2=0, H3=1, H4=2, H5=3, H6=4 " if multiple H1 then depth H1= 0, H2=1, H3=2, H4=3, H5=4, H6=5 " indent subsequent headers levels by shiftwidth