Fix: Accessing other filetypes within vimwiki (Issue #979)

Note: Viwiki no longer rules them all
This commit is contained in:
Tinmarino 2020-08-07 13:02:54 -04:00
parent 4aa3ca5c16
commit 659ca62b29
3 changed files with 34 additions and 8 deletions

View File

@ -1091,16 +1091,8 @@ function! vimwiki#base#edit_file(command, filename, anchor, ...) abort
echom 'Vimwiki: Vim couldn''t open the file, probably because a swapfile already exists. See :h E325.'
return
endtry
" 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
" rules them all! Well, except for directories, which may be opened with
" Netrw
if !vimwiki#u#ft_is_vw() && fname !~? '\m/$'
call vimwiki#u#ft_set()
endif
endif
" Goto anchor

View File

@ -3766,6 +3766,7 @@ Changed:~
Removed:~
Fixed:~
* Issue #979: Fix: Accessing other filetypes within vimwiki
* Issue #886: VimwikiGenerateLinks crash with single quote in filename
* Issue #910: Fix: VimwikiTOC removes next non-empty line
* Issue #182: VimwikiTOC support headers with link

33
test/filesystem.vader Normal file
View File

@ -0,0 +1,33 @@
# Travel thought files
Execute (Copy Wiki's Resources):
Log "Start: Copy Resources"
call CopyResources()
Given (Void for Accessing other files within vimwiki #979 {{{1):
Do (At Index: Create and goto pythonfile):
:VimwikiIndex 2\<Cr>
Opyfile.py\<Esc>\<Cr>\<Cr>
:AssertEqual 'pyfile.py', expand('%:t')\<CR>
:AssertEqual 'python', &ft\<CR>
:Log "Clean pyfile"\<Cr>
dd
:VimwikiIndex 2\<Cr>
:call DeleteFile('pyfile.py')\<Cr>
Do (At Index: Create and goto markdownfile):
:VimwikiIndex 2\<Cr>
Omdfile.md\<Esc>\<Cr>\<Cr>
:AssertEqual 'mdfile.md', expand('%:t')\<CR>
:AssertEqual 'vimwiki', &ft\<CR>
:Log "Clean mdfile"\<Cr>
:VimwikiIndex 2\<Cr>
dd
:call DeleteFile('mdfile.md')\<Cr>
# vim: sw=2:foldmethod=marker:foldlevel=30:foldignore=: