Fix completion in some circumstances
This commit is contained in:
parent
ac4f66586a
commit
df5e49c7fd
@ -39,15 +39,15 @@ setlocal tags+=./.tags
|
|||||||
" COMPLETION {{{
|
" COMPLETION {{{
|
||||||
function! Complete_wikifiles(findstart, base)
|
function! Complete_wikifiles(findstart, base)
|
||||||
if a:findstart == 1
|
if a:findstart == 1
|
||||||
let column = col('.')-1
|
let column = col('.')-2
|
||||||
let line = getline('.')[:column]
|
let line = getline('.')[:column]
|
||||||
let startoflink = match(line, '\[\[\zs[^\\[]*$')
|
let startoflink = match(line, '\[\[\zs[^\\[\]]*$')
|
||||||
if startoflink != -1
|
if startoflink != -1
|
||||||
let s:line_context = '['
|
let s:line_context = '['
|
||||||
return startoflink
|
return startoflink
|
||||||
endif
|
endif
|
||||||
if VimwikiGet('syntax') == 'markdown'
|
if VimwikiGet('syntax') == 'markdown'
|
||||||
let startofinlinelink = match(line, '\[.*\](\zs.*$')
|
let startofinlinelink = match(line, '\[.*\](\zs[^)]*$')
|
||||||
if startofinlinelink != -1
|
if startofinlinelink != -1
|
||||||
let s:line_context = '['
|
let s:line_context = '['
|
||||||
return startofinlinelink
|
return startofinlinelink
|
||||||
|
Loading…
Reference in New Issue
Block a user