summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--ftdetect/polyglot.vim4
1 files changed, 2 insertions, 2 deletions
diff --git a/ftdetect/polyglot.vim b/ftdetect/polyglot.vim
index ed800dab..0ff59e1b 100644
--- a/ftdetect/polyglot.vim
+++ b/ftdetect/polyglot.vim
@@ -31,10 +31,10 @@ set cpo&vim
set nofileignorecase
func! s:Observe(fn)
- let b:polyglot_observe = a:fn
+ let b:PolyglotObserve = function("polyglot#" . a:fn)
augroup polyglot-observer
au! CursorHold,CursorHoldI,BufWritePost <buffer>
- \ execute('if polyglot#' . b:polyglot_observe . '() | au! polyglot-observer | endif')
+ \ if b:PolyglotObserve() | au! polyglot-observer | endif
augroup END
endfunc