Refactor then updating of the known wiki pages
for the 'maxhi' option.
This commit is contained in:
parent
967b342b23
commit
f48dce6f1d
@ -566,8 +566,6 @@ function! vimwiki#vars#get_bufferlocal(key, ...)
|
|||||||
\ vimwiki#base#get_wiki_directories(vimwiki#vars#get_bufferlocal('wiki_nr')))
|
\ vimwiki#base#get_wiki_directories(vimwiki#vars#get_bufferlocal('wiki_nr')))
|
||||||
elseif a:key ==# 'prev_link'
|
elseif a:key ==# 'prev_link'
|
||||||
call setbufvar(buffer, 'vimwiki_prev_link', [])
|
call setbufvar(buffer, 'vimwiki_prev_link', [])
|
||||||
elseif a:key ==# 'fs_rescan'
|
|
||||||
call setbufvar(buffer, 'vimwiki_fs_rescan', 0)
|
|
||||||
elseif a:key ==# 'markdown_refs'
|
elseif a:key ==# 'markdown_refs'
|
||||||
call setbufvar(buffer, 'vimwiki_markdown_refs', vimwiki#markdown_base#scan_reflinks())
|
call setbufvar(buffer, 'vimwiki_markdown_refs', vimwiki#markdown_base#scan_reflinks())
|
||||||
else
|
else
|
||||||
|
@ -61,17 +61,16 @@ function! s:setup_new_wiki_buffer() "{{{
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if vimwiki#vars#get_wikilocal('maxhi')
|
||||||
|
call vimwiki#vars#set_bufferlocal('existing_wikifiles', vimwiki#base#get_wikilinks(wiki_nr, 1))
|
||||||
|
call vimwiki#vars#set_bufferlocal('existing_wikidirs',
|
||||||
|
\ vimwiki#base#get_wiki_directories(wiki_nr))
|
||||||
|
endif
|
||||||
|
|
||||||
" this makes that ftplugin/vimwiki.vim and afterwards syntax/vimwiki.vim are
|
" this makes that ftplugin/vimwiki.vim and afterwards syntax/vimwiki.vim are
|
||||||
" sourced
|
" sourced
|
||||||
setfiletype vimwiki
|
setfiletype vimwiki
|
||||||
|
|
||||||
" to force a rescan of the filesystem which may have changed
|
|
||||||
" and update VimwikiLinks syntax group that depends on it;
|
|
||||||
" 'fs_rescan' indicates that setup_filetype() has not been run
|
|
||||||
if vimwiki#vars#get_bufferlocal('fs_rescan') == 1 && vimwiki#vars#get_wikilocal('maxhi')
|
|
||||||
set syntax=vimwiki
|
|
||||||
endif
|
|
||||||
call vimwiki#vars#set_bufferlocal('fs_rescan', 1)
|
|
||||||
endfunction "}}}
|
endfunction "}}}
|
||||||
|
|
||||||
|
|
||||||
@ -91,14 +90,6 @@ function! s:setup_buffer_enter() "{{{
|
|||||||
|
|
||||||
if &filetype == ''
|
if &filetype == ''
|
||||||
setfiletype vimwiki
|
setfiletype vimwiki
|
||||||
elseif &syntax ==? 'vimwiki'
|
|
||||||
" to force a rescan of the filesystem which may have changed
|
|
||||||
" and update VimwikiLinks syntax group that depends on it;
|
|
||||||
" 'fs_rescan' indicates that setup_filetype() has not been run
|
|
||||||
if vimwiki#vars#get_bufferlocal('fs_rescan') == 1 && vimwiki#vars#get_wikilocal('maxhi')
|
|
||||||
set syntax=vimwiki
|
|
||||||
endif
|
|
||||||
call vimwiki#vars#set_bufferlocal('fs_rescan', 1)
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" The settings foldmethod, foldexpr and foldtext are local to window. Thus in
|
" The settings foldmethod, foldexpr and foldtext are local to window. Thus in
|
||||||
|
Loading…
Reference in New Issue
Block a user