Fix more regression bugs
This commit is contained in:
parent
d5ed58f763
commit
4e16db926f
@ -378,7 +378,7 @@ function! vimwiki#base#find_files(wiki_nr, directories_only)
|
|||||||
" if current wiki is temporary -- was added by an arbitrary wiki file then do
|
" if current wiki is temporary -- was added by an arbitrary wiki file then do
|
||||||
" not search wiki files in subdirectories. Or it would hang the system if
|
" not search wiki files in subdirectories. Or it would hang the system if
|
||||||
" wiki file was created in $HOME or C:/ dirs.
|
" wiki file was created in $HOME or C:/ dirs.
|
||||||
if vimwiki#vars#get_wikilocal('temp', wiki_nr)
|
if vimwiki#vars#get_wikilocal('is_temporary_wiki', wiki_nr)
|
||||||
let pattern = '*'.ext
|
let pattern = '*'.ext
|
||||||
else
|
else
|
||||||
let pattern = '**/*'.ext
|
let pattern = '**/*'.ext
|
||||||
@ -707,11 +707,15 @@ function! vimwiki#base#edit_file(command, filename, anchor, ...) "{{{
|
|||||||
" getpos() directly after this command. Strange.
|
" getpos() directly after this command. Strange.
|
||||||
if !(a:command ==# ':e ' && vimwiki#path#is_equal(a:filename, expand('%:p')))
|
if !(a:command ==# ':e ' && vimwiki#path#is_equal(a:filename, expand('%:p')))
|
||||||
execute a:command.' '.fname
|
execute a:command.' '.fname
|
||||||
|
|
||||||
|
" If the opened file was not already loaded by Vim, an autocommand is
|
||||||
|
" triggered at this point
|
||||||
|
|
||||||
" Make sure no other plugin takes ownership over the new file. Vimwiki
|
" Make sure no other plugin takes ownership over the new file. Vimwiki
|
||||||
" rules them all! Well, except for directories, which may be opened with
|
" rules them all! Well, except for directories, which may be opened with
|
||||||
" Netrw
|
" Netrw
|
||||||
if &filetype != 'vimwiki' && fname !~ '\m/$'
|
if &filetype != 'vimwiki' && fname !~ '\m/$'
|
||||||
set filetype=vimwiki
|
setfiletype vimwiki
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
if a:anchor != ''
|
if a:anchor != ''
|
||||||
|
@ -192,6 +192,7 @@ function! s:populate_wikilocal_options()
|
|||||||
|
|
||||||
let g:vimwiki_wikilocal_vars = []
|
let g:vimwiki_wikilocal_vars = []
|
||||||
|
|
||||||
|
" set the wiki-local variables according to g:vimwiki_list (or the default settings)
|
||||||
if exists('g:vimwiki_list')
|
if exists('g:vimwiki_list')
|
||||||
for users_options in g:vimwiki_list
|
for users_options in g:vimwiki_list
|
||||||
let new_wiki_settings = {}
|
let new_wiki_settings = {}
|
||||||
@ -205,8 +206,7 @@ function! s:populate_wikilocal_options()
|
|||||||
endif
|
endif
|
||||||
endfor
|
endfor
|
||||||
|
|
||||||
" is it a temporary wiki? No, it's not.
|
let new_wiki_settings.is_temporary_wiki = 0
|
||||||
let new_wiki_settings.temp = 0
|
|
||||||
|
|
||||||
call add(g:vimwiki_wikilocal_vars, new_wiki_settings)
|
call add(g:vimwiki_wikilocal_vars, new_wiki_settings)
|
||||||
endfor
|
endfor
|
||||||
@ -221,7 +221,7 @@ function! s:populate_wikilocal_options()
|
|||||||
let temporary_options_dict[key] = default_values[key]
|
let temporary_options_dict[key] = default_values[key]
|
||||||
endif
|
endif
|
||||||
endfor
|
endfor
|
||||||
let temporary_options_dict.temp = 1
|
let temporary_options_dict.is_temporary_wiki = 1
|
||||||
call add(g:vimwiki_wikilocal_vars, temporary_options_dict)
|
call add(g:vimwiki_wikilocal_vars, temporary_options_dict)
|
||||||
|
|
||||||
call s:validate_settings()
|
call s:validate_settings()
|
||||||
@ -250,10 +250,13 @@ function! vimwiki#vars#populate_syntax_vars(syntax)
|
|||||||
if !exists('g:vimwiki_syntax_variables')
|
if !exists('g:vimwiki_syntax_variables')
|
||||||
let g:vimwiki_syntax_variables = {}
|
let g:vimwiki_syntax_variables = {}
|
||||||
endif
|
endif
|
||||||
if !has_key(g:vimwiki_syntax_variables, a:syntax)
|
|
||||||
let g:vimwiki_syntax_variables[a:syntax] = {}
|
if has_key(g:vimwiki_syntax_variables, a:syntax)
|
||||||
|
return
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
let g:vimwiki_syntax_variables[a:syntax] = {}
|
||||||
|
|
||||||
execute 'runtime! syntax/vimwiki_'.a:syntax.'.vim'
|
execute 'runtime! syntax/vimwiki_'.a:syntax.'.vim'
|
||||||
|
|
||||||
" generic stuff
|
" generic stuff
|
||||||
|
@ -13,7 +13,8 @@ let b:did_ftplugin = 1 " Don't load another plugin for this buffer
|
|||||||
let b:undo_ftplugin = "setlocal ".
|
let b:undo_ftplugin = "setlocal ".
|
||||||
\ "suffixesadd< isfname< formatlistpat< ".
|
\ "suffixesadd< isfname< formatlistpat< ".
|
||||||
\ "formatoptions< foldtext< ".
|
\ "formatoptions< foldtext< ".
|
||||||
\ "foldmethod< foldexpr< commentstring< "
|
\ "foldmethod< foldexpr< commentstring< tags< omnifunc< autoindent< ".
|
||||||
|
\ "smartindent< cindent< comments< formatoptions<"
|
||||||
" UNDO }}}
|
" UNDO }}}
|
||||||
|
|
||||||
" MISC STUFF {{{
|
" MISC STUFF {{{
|
||||||
|
@ -61,8 +61,9 @@ function! s:setup_new_wiki_buffer() "{{{
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" this makes that ftplugin/vimwiki.vim is sourced
|
" this makes that ftplugin/vimwiki.vim and afterwards syntax/vimwiki.vim are
|
||||||
set filetype=vimwiki
|
" sourced
|
||||||
|
setfiletype vimwiki
|
||||||
|
|
||||||
" to force a rescan of the filesystem which may have changed
|
" to force a rescan of the filesystem which may have changed
|
||||||
" and update VimwikiLinks syntax group that depends on it;
|
" and update VimwikiLinks syntax group that depends on it;
|
||||||
@ -86,7 +87,7 @@ function! s:setup_buffer_enter() "{{{
|
|||||||
let &autowriteall = vimwiki#vars#get_global('autowriteall')
|
let &autowriteall = vimwiki#vars#get_global('autowriteall')
|
||||||
|
|
||||||
if &filetype == ''
|
if &filetype == ''
|
||||||
set filetype=vimwiki
|
setfiletype vimwiki
|
||||||
elseif &syntax ==? 'vimwiki'
|
elseif &syntax ==? 'vimwiki'
|
||||||
" to force a rescan of the filesystem which may have changed
|
" to force a rescan of the filesystem which may have changed
|
||||||
" and update VimwikiLinks syntax group that depends on it;
|
" and update VimwikiLinks syntax group that depends on it;
|
||||||
|
@ -311,7 +311,9 @@ if vimwiki#vars#get_global('hl_headers') == 0
|
|||||||
endfor
|
endfor
|
||||||
else
|
else
|
||||||
for s:i in range(1,6)
|
for s:i in range(1,6)
|
||||||
execute 'hi def VimwikiHeader'.s:i.' guibg=bg guifg='.vimwiki#vars#get_global('hcolor_guifg_'.&bg)[s:i-1].' gui=bold ctermfg='.vimwiki#vars#get_global('ctermfg_'.&bg)[s:i-1].' term=bold cterm=bold'
|
execute 'hi def VimwikiHeader'.s:i.' guibg=bg guifg='
|
||||||
|
\ .vimwiki#vars#get_global('hcolor_guifg_'.&bg)[s:i-1].' gui=bold ctermfg='
|
||||||
|
\ .vimwiki#vars#get_global('hcolor_ctermfg_'.&bg)[s:i-1].' term=bold cterm=bold'
|
||||||
endfor
|
endfor
|
||||||
endif
|
endif
|
||||||
"}}}
|
"}}}
|
||||||
|
Loading…
Reference in New Issue
Block a user