Remove some unreachable code

This commit is contained in:
EinfachToll 2015-12-07 12:25:17 +01:00
parent 37aae9c3ce
commit c565b38bb6

View File

@ -83,7 +83,7 @@ fun! s:read_captions(files) "{{{
return result return result
endfun "}}} endfun "}}}
fun! s:get_diary_links(...) "{{{ fun! s:get_diary_links() "{{{
let rx = '^\d\{4}-\d\d-\d\d' let rx = '^\d\{4}-\d\d-\d\d'
let s_files = glob(VimwikiGet('path').VimwikiGet('diary_rel_path').'*'.VimwikiGet('ext')) let s_files = glob(VimwikiGet('path').VimwikiGet('diary_rel_path').'*'.VimwikiGet('ext'))
let files = split(s_files, '\n') let files = split(s_files, '\n')
@ -92,9 +92,6 @@ fun! s:get_diary_links(...) "{{{
" remove backup files (.wiki~) " remove backup files (.wiki~)
call filter(files, 'v:val !~# ''.*\~$''') call filter(files, 'v:val !~# ''.*\~$''')
if a:0
call add(files, a:1)
endif
let links_with_captions = s:read_captions(files) let links_with_captions = s:read_captions(files)
return links_with_captions return links_with_captions
@ -129,14 +126,10 @@ function! s:sort(lst) "{{{
endif endif
endfunction "}}} endfunction "}}}
function! s:format_diary(...) "{{{ function! s:format_diary() "{{{
let result = [] let result = []
if a:0
let g_files = s:group_links(s:get_diary_links(a:1))
else
let g_files = s:group_links(s:get_diary_links()) let g_files = s:group_links(s:get_diary_links())
endif
for year in s:sort(keys(g_files)) for year in s:sort(keys(g_files))
call add(result, '') call add(result, '')