summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFabien RAJAONARISON <rajaonarisonfabien@yahoo.fr>2020-11-02 19:46:24 +0100
committerGitHub <noreply@github.com>2020-11-02 19:46:24 +0100
commitcd768124020d3c565f1d400ea0537949351b26a2 (patch)
tree45c6641124a85010e13b936ff11c7abfea622777
parentff35c02445813b253b9cb76ba7fe2fabac71a01c (diff)
downloadvim-polyglot-cd768124020d3c565f1d400ea0537949351b26a2.tar.gz
vim-polyglot-cd768124020d3c565f1d400ea0537949351b26a2.zip
fix undefined cpo_save (#623)
-rw-r--r--ftdetect/polyglot.vim8
1 files changed, 5 insertions, 3 deletions
diff --git a/ftdetect/polyglot.vim b/ftdetect/polyglot.vim
index 385edb0c..72d938e8 100644
--- a/ftdetect/polyglot.vim
+++ b/ftdetect/polyglot.vim
@@ -120,9 +120,11 @@ endfunc
augroup polyglot-observer | augroup END
-" Restore 'cpoptions'
-let &cpo = s:cpo_save
-unlet s:cpo_save
+if exists('s:cpo_save')
+ " Restore 'cpoptions'
+ let &cpo = s:cpo_save
+ unlet s:cpo_save
+endif
" Load user-defined filetype.vim and oter plugins ftdetect first
" This is to use polyglot-defined ftdetect always as fallback to user settings