From df5e49c7fdb684bccd67ef4baac2c29e17745117 Mon Sep 17 00:00:00 2001 From: EinfachToll Date: Mon, 9 Feb 2015 21:56:28 +0100 Subject: [PATCH] Fix completion in some circumstances --- ftplugin/vimwiki.vim | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ftplugin/vimwiki.vim b/ftplugin/vimwiki.vim index ea2be98..c6bc5cb 100644 --- a/ftplugin/vimwiki.vim +++ b/ftplugin/vimwiki.vim @@ -39,15 +39,15 @@ setlocal tags+=./.tags " COMPLETION {{{ function! Complete_wikifiles(findstart, base) if a:findstart == 1 - let column = col('.')-1 + let column = col('.')-2 let line = getline('.')[:column] - let startoflink = match(line, '\[\[\zs[^\\[]*$') + let startoflink = match(line, '\[\[\zs[^\\[\]]*$') if startoflink != -1 let s:line_context = '[' return startoflink endif if VimwikiGet('syntax') == 'markdown' - let startofinlinelink = match(line, '\[.*\](\zs.*$') + let startofinlinelink = match(line, '\[.*\](\zs[^)]*$') if startofinlinelink != -1 let s:line_context = '[' return startofinlinelink