vimwiki

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

commit c565b38bb607b7996ff691e3ed98619b5a7fbaaa
parent 37aae9c3ce8c9abf0dbf4c1946ee8e53d76564e5
Author: EinfachToll <istjanichtzufassen@googlemail.com>
Date:   Mon,  7 Dec 2015 12:25:17 +0100

Remove some unreachable code

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

diff --git 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, '')