plugin: save/restore cpo setting

This has been missing way too long. It should always be set to a sane
vim default, as documented (:h write-plugin). So add it as well.
This commit is contained in:
Christian Brabandt 2019-12-13 10:17:15 +01:00
parent 5f9ae83f44
commit 9f00b402c5
No known key found for this signature in database
GPG Key ID: F3F92DA383FDDE09

View File

@ -1,6 +1,9 @@
" MIT License. Copyright (c) 2013-2019 Bailey Ling, Christian Brabandt et al.
" vim: et ts=2 sts=2 sw=2
let s:save_cpo = &cpo
set cpo&vim
scriptencoding utf-8
if &cp || v:version < 702 || (exists('g:loaded_airline') && g:loaded_airline)
@ -292,3 +295,6 @@ command! AirlineExtensions call s:airline_extensions()
call airline#init#bootstrap()
call s:airline_toggle()
let &cpo = s:save_cpo
unlet s:save_cpo