Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Make setting of omnifunc conditional. Change strlen to len.

  • Loading branch information...
commit 74873cff7aab01c91c78e2b1e7f922f1b357aaba 1 parent 549f4ae
@bhenderson bhenderson authored
Showing with 4 additions and 2 deletions.
  1. +4 −2 plugin/querycommandcomplete.vim
View
6 plugin/querycommandcomplete.vim
@@ -49,7 +49,7 @@ if !exists("g:qcc_query_command")
let s:querycmd = system('mutt -Q query_command 2>/dev/null')
let s:querycmd = substitute(s:querycmd, '^query_command=\"\(.*\) .%s.\"\n', '\1','')
- if strlen(s:querycmd)
+ if len(s:querycmd)
let g:qcc_query_command = s:querycmd
else
echoerr "QueryCommandComplete: g:qcc_query_command not set!"
@@ -142,5 +142,7 @@ function! QueryCommandComplete(findstart, base)
endif
endfunction
+" only set omnifunc if not already set
+autocmd FileType mail if !len(&omnifunc) | setlocal omnifunc=QueryCommandComplete | endif
+
let &cpo = s:save_cpo
-au FileType mail setlocal omnifunc=QueryCommandComplete
Please sign in to comment.
Something went wrong with that request. Please try again.