Extended completion

This commit is contained in:
Shy 2017-03-31 17:31:54 +02:00
parent db60ba1fac
commit 4b9d86b470

View file

@ -162,8 +162,11 @@ function s:C4ctrlCompletion(ArgLead, CmdLine, CursorPos)
try " Just for cleaning up in the finally statement try " Just for cleaning up in the finally statement
if stridx("open", get(s:relCmdLine, 1)) == 0 if stridx("open", get(s:relCmdLine, 1)) == 0
if a:ArgLead != "" if a:ArgLead != ""
return "open" if len(s:relCmdLine) == 2
elseif len(s:relCmdLine) > 2 " Do not return more than one name return "open"
endif
elseif len(s:relCmdLine) > 2
" Do not return more than one file name
return "" return ""
endif endif
let s:cfgdir = s:FindConfigDir() let s:cfgdir = s:FindConfigDir()
@ -197,8 +200,11 @@ function s:C4ctrlCompletion(ArgLead, CmdLine, CursorPos)
elseif stridx("write", get(s:relCmdLine, 1)) == 0 elseif stridx("write", get(s:relCmdLine, 1)) == 0
if a:ArgLead != "" if a:ArgLead != ""
return "write" if len(s:relCmdLine) == 2 && a:ArgLead != ""
elseif len(s:relCmdLine) > 2 " Do not return more than one name return "write"
endif
elseif len(s:relCmdLine) > 2 && a:ArgLead == ""
" Do not return more than one file name
return "" return ""
endif endif
let s:cfgdir = s:FindConfigDir() let s:cfgdir = s:FindConfigDir()