Skip to content
This repository has been archived by the owner on Oct 16, 2019. It is now read-only.

Restore cpoptions #37

Open
ronnieliew opened this issue Jul 22, 2012 · 2 comments
Open

Restore cpoptions #37

ronnieliew opened this issue Jul 22, 2012 · 2 comments

Comments

@ronnieliew
Copy link

cpoptions is saved but not restored at the end.
This results in the plugin breaking any user settings

The below should be added at the end of the plugin

let &cpo = s:global_cpo

@artm
Copy link
Collaborator

artm commented Sep 9, 2012

Are you sure the plugin will work with different cpoptions than the ones it forces? How could I test that? (for me the plugin works with or without your fix and with or without forcing incompatible mode, so I guess I just have the cpoptions it needs by default)

@blueyed
Copy link
Contributor

blueyed commented Oct 1, 2012

@artm
It's common practice for plugins to restore &cpo at the end - after all that's the only reason to save &cpo in the first place.
I cannot tell you why, but it's likely to avoid any errors during being parsed at least.
If you would have special requirements you would have to check for them at the beginning of the script itself.

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants