Wiki links starting with / are always relative to the wiki root

Also, links with the file: scheme are absolute iff they start with / or
drive letter

Ref #105
This commit is contained in:
EinfachToll
2015-03-13 16:31:15 +01:00
parent 8d7d568214
commit 6922836a0c
4 changed files with 160 additions and 104 deletions

View File

@ -84,9 +84,9 @@ function! Complete_wikifiles(findstart, base)
let segments = split(a:base, '#', 1)
let given_wikifile = segments[0] == '' ? expand('%:t:r') : segments[0]
let link_infos = vimwiki#base#resolve_scheme(given_wikifile.'#', 0, 1)
let wikifile = link_infos[6]
let syntax = VimwikiGet('syntax', link_infos[0])
let link_infos = vimwiki#base#resolve_link(given_wikifile.'#')
let wikifile = link_infos.filename
let syntax = VimwikiGet('syntax', link_infos.index)
let anchors = vimwiki#base#get_anchors(wikifile, syntax)
let filtered_anchors = []