From c565b38bb607b7996ff691e3ed98619b5a7fbaaa Mon Sep 17 00:00:00 2001 From: EinfachToll Date: Mon, 7 Dec 2015 12:25:17 +0100 Subject: [PATCH] Remove some unreachable code --- autoload/vimwiki/diary.vim | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/autoload/vimwiki/diary.vim b/autoload/vimwiki/diary.vim index 540a766..54719f2 100644 --- a/autoload/vimwiki/diary.vim +++ b/autoload/vimwiki/diary.vim @@ -83,7 +83,7 @@ fun! s:read_captions(files) "{{{ return result endfun "}}} -fun! s:get_diary_links(...) "{{{ +fun! s:get_diary_links() "{{{ let rx = '^\d\{4}-\d\d-\d\d' let s_files = glob(VimwikiGet('path').VimwikiGet('diary_rel_path').'*'.VimwikiGet('ext')) let files = split(s_files, '\n') @@ -92,9 +92,6 @@ fun! s:get_diary_links(...) "{{{ " remove backup files (.wiki~) call filter(files, 'v:val !~# ''.*\~$''') - if a:0 - call add(files, a:1) - endif let links_with_captions = s:read_captions(files) return links_with_captions @@ -129,14 +126,10 @@ function! s:sort(lst) "{{{ endif endfunction "}}} -function! s:format_diary(...) "{{{ +function! s:format_diary() "{{{ 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()) - endif + let g_files = s:group_links(s:get_diary_links()) for year in s:sort(keys(g_files)) call add(result, '')