Skip to content

Commit ff35c02

Browse files
authored
Restore cpoptions before recursive ftdetect read, fixes #619 (#621)
1 parent 32f5e90 commit ff35c02

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

ftdetect/polyglot.vim

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,10 @@ endfunc
120120

121121
augroup polyglot-observer | augroup END
122122

123+
" Restore 'cpoptions'
124+
let &cpo = s:cpo_save
125+
unlet s:cpo_save
126+
123127
" Load user-defined filetype.vim and oter plugins ftdetect first
124128
" This is to use polyglot-defined ftdetect always as fallback to user settings
125129
augroup filetypedetect
@@ -130,6 +134,10 @@ augroup END
130134

131135
augroup filetypedetect
132136

137+
" Switch to compatible mode for the time being
138+
let s:cpo_save = &cpo
139+
set cpo&vim
140+
133141
" DO NOT EDIT CODE BELOW, IT IS GENERATED WITH MAKEFILE
134142

135143
if !has_key(g:polyglot_is_disabled, 'context')

0 commit comments

Comments
 (0)