fix diary list, indent according to list_margin

The list of diary entries now is not indented according to the vim
`shiftwidth` setting, but gets the indentation from list_margin (as is
the case for `vimwiki#base#generate_links`).
This commit is contained in:
beuerle 2018-03-07 16:59:49 +01:00 committed by EinfachToll
parent 8009e5c7cf
commit 16b9e45b03

View File

@ -143,11 +143,11 @@ function! s:format_diary() "{{{
if empty(cap)
let entry = substitute(vimwiki#vars#get_global('WikiLinkTemplate1'), '__LinkUrl__', fl, '')
let entry = substitute(entry, '__LinkDescription__', cap, '')
call add(result, repeat(' ', &sw).'* '.entry)
call add(result, repeat(' ', vimwiki#lst#get_list_margin()).'* '.entry)
else
let entry = substitute(vimwiki#vars#get_global('WikiLinkTemplate2'), '__LinkUrl__', fl, '')
let entry = substitute(entry, '__LinkDescription__', cap, '')
call add(result, repeat(' ', &sw).'* '.entry)
call add(result, repeat(' ', vimwiki#lst#get_list_margin()).'* '.entry)
endif
endfor