diff options
author | Cookies <1732074+cookie-s@users.noreply.github.com> | 2020-11-03 02:48:59 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-02 18:48:59 +0100 |
commit | ff35c02445813b253b9cb76ba7fe2fabac71a01c (patch) | |
tree | 9360019fe4ebbc0e5bf91e9d1980636c72bb9804 /ftdetect/polyglot.vim | |
parent | 32f5e907370d5b635df9372b202b39492dc5dfd8 (diff) | |
download | vim-polyglot-ff35c02445813b253b9cb76ba7fe2fabac71a01c.tar.gz vim-polyglot-ff35c02445813b253b9cb76ba7fe2fabac71a01c.zip |
Restore cpoptions before recursive ftdetect read, fixes #619 (#621)
Diffstat (limited to 'ftdetect/polyglot.vim')
-rw-r--r-- | ftdetect/polyglot.vim | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/ftdetect/polyglot.vim b/ftdetect/polyglot.vim index 3b50d4d3..385edb0c 100644 --- a/ftdetect/polyglot.vim +++ b/ftdetect/polyglot.vim @@ -120,6 +120,10 @@ endfunc augroup polyglot-observer | augroup END +" Restore 'cpoptions' +let &cpo = s:cpo_save +unlet s:cpo_save + " Load user-defined filetype.vim and oter plugins ftdetect first " This is to use polyglot-defined ftdetect always as fallback to user settings augroup filetypedetect @@ -130,6 +134,10 @@ augroup END augroup filetypedetect +" Switch to compatible mode for the time being +let s:cpo_save = &cpo +set cpo&vim + " DO NOT EDIT CODE BELOW, IT IS GENERATED WITH MAKEFILE if !has_key(g:polyglot_is_disabled, 'context') |