Omnicompletion fix for Windows (#660)

* Temporary fix for omnicomplete of vimwiki links - #456.

This fixes the omnicomplete of wiki links under Windows which were
not working since paths on Windows use '\' instead of '/'. This is
a temporary fix until path refactoring is done.

* Update changelog with description of fix for #456
This commit is contained in:
Rane Brown
2019-04-20 08:28:32 -07:00
committed by Michael F. Schönitzer
parent 13adbe3510
commit 37f020d21a
3 changed files with 39 additions and 6 deletions

View File

@ -486,6 +486,10 @@ function! vimwiki#base#get_wikilinks(wiki_nr, also_absolute_links)
let result = []
for wikifile in files
let wikifile = fnamemodify(wikifile, ':r') " strip extension
if vimwiki#u#is_windows()
" TODO temporary fix see #478
let wikifile = substitute(wikifile , '/', '\', 'g')
endif
let wikifile = vimwiki#path#relpath(cwd, wikifile)
call add(result, wikifile)
endfor
@ -497,6 +501,10 @@ function! vimwiki#base#get_wikilinks(wiki_nr, also_absolute_links)
let cwd = vimwiki#vars#get_wikilocal('path') . vimwiki#vars#get_wikilocal('diary_rel_path')
endif
let wikifile = fnamemodify(wikifile, ':r') " strip extension
if vimwiki#u#is_windows()
" TODO temporary fix see #478
let wikifile = substitute(wikifile , '/', '\', 'g')
endif
let wikifile = '/'.vimwiki#path#relpath(cwd, wikifile)
call add(result, wikifile)
endfor