diff options
| author | Adam Stankiewicz <sheerun@sher.pl> | 2020-10-17 13:49:45 +0200 |
|---|---|---|
| committer | Adam Stankiewicz <sheerun@sher.pl> | 2020-10-17 13:49:45 +0200 |
| commit | 6b663ec330356e92de9c68a6dac09a80a2d5b07c (patch) | |
| tree | ca9240413fbcc0d925690d0b40de94a07605ee7b /ftdetect | |
| parent | 6b9625ecd5d8ef8af7f84a8b61759e104c0c904e (diff) | |
| download | vim-polyglot-6b663ec330356e92de9c68a6dac09a80a2d5b07c.tar.gz vim-polyglot-6b663ec330356e92de9c68a6dac09a80a2d5b07c.zip | |
Change implementation of observing, fixes #584
Diffstat (limited to 'ftdetect')
| -rw-r--r-- | ftdetect/polyglot.vim | 4 |
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 |
