vim-autoclose icon indicating copy to clipboard operation
vim-autoclose copied to clipboard

Restore cpoptions

Open ronnieliew opened this issue 13 years ago • 2 comments

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

ronnieliew avatar Jul 22 '12 22:07 ronnieliew

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)

artm avatar Sep 09 '12 10:09 artm

@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.

blueyed avatar Oct 01 '12 21:10 blueyed