Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restore cpoptions before recursive ftdetect read, fixes #619 #621

Merged
merged 1 commit into from
Nov 2, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions ftdetect/polyglot.vim
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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')
Expand Down