Permalink
Browse files

Fix omnifunc's requirement test error messages.

Quick fix that could probably be better organised.
  • Loading branch information...
1 parent e7e6b4e commit 34a086257a2430a14526daf25b50cc7a2b6894e9 @dkearns dkearns committed Jun 14, 2012
Showing with 10 additions and 9 deletions.
  1. +10 −9 autoload/rubycomplete.vim
View
@@ -11,16 +11,23 @@
" ----------------------------------------------------------------------------
" {{{ requirement checks
+
+function! s:ErrMsg(msg)
+ echohl ErrorMsg
+ echo a:msg
+ echohl None
+endfunction
+
if !has('ruby')
- s:ErrMsg( "Error: Rubycomplete requires vim compiled with +ruby" )
- s:ErrMsg( "Error: falling back to syntax completion" )
+ call s:ErrMsg( "Error: Rubycomplete requires vim compiled with +ruby" )
+ call s:ErrMsg( "Error: falling back to syntax completion" )
" lets fall back to syntax completion
setlocal omnifunc=syntaxcomplete#Complete
finish
endif
if version < 700
- s:ErrMsg( "Error: Required vim >= 7.0" )
+ call s:ErrMsg( "Error: Required vim >= 7.0" )
finish
endif
" }}} requirement checks
@@ -50,12 +57,6 @@ endif
" {{{ vim-side support functions
let s:rubycomplete_debug = 0
-function! s:ErrMsg(msg)
- echohl ErrorMsg
- echo a:msg
- echohl None
-endfunction
-
function! s:dprint(msg)
if s:rubycomplete_debug == 1
echom a:msg

0 comments on commit 34a0862

Please sign in to comment.