vimwiki

Personal wiki for vim
git clone https://github.com/vimwiki/vimwiki.git
Log | Files | Refs | README | LICENSE

commit 82ba1e99bf5deb963d93db781b494a7d25dfd690
parent 3bf389bf99eafd5614ee7d37adf6e67747cdc934
Author: Rane Brown <rane.brown@gmail.com>
Date:   Mon,  8 Apr 2019 22:18:07 -0600

Move variable declaration outside of for loop

Diffstat:
Mautoload/vimwiki/diary.vim | 5+++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git 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