Make generation functions compatible with older vims.
PR #634, PR #635, and PR #636 introduced new features that broke compatibility with older version of Vim. This modifies those changes to ensure compatibility. Closes #781. Removes usage of funcref(), closure. Fixes filter() call. Made globpath calls not use the list argument. Unlet a variable that is reused (sticky type checking) v7.4.1989 modified filter() to accept a Funcref v7.4.2120 Added function "closure" argument v7.4.2137 add funcref()
This commit is contained in:
@ -312,7 +312,8 @@ endfunction
|
||||
|
||||
function! vimwiki#diary#generate_diary_section()
|
||||
|
||||
function! Generator() closure
|
||||
let GeneratorDiary = copy(l:)
|
||||
function! GeneratorDiary.f()
|
||||
let lines = []
|
||||
|
||||
let links_with_captions = s:read_captions(s:get_diary_files())
|
||||
@ -392,7 +393,7 @@ function! vimwiki#diary#generate_diary_section()
|
||||
\ '\%(^\s*$\)\|\%('.vimwiki#vars#get_syntaxlocal('rxListBullet').'\)'
|
||||
|
||||
call vimwiki#base#update_listing_in_buffer(
|
||||
\ funcref('Generator'),
|
||||
\ GeneratorDiary,
|
||||
\ vimwiki#vars#get_wikilocal('diary_header'),
|
||||
\ content_rx,
|
||||
\ 1,
|
||||
|
Reference in New Issue
Block a user