From decb4192aac7e32498b90be52877077b7659c568 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20DOUIN?= Date: Sat, 11 Sep 2021 00:51:25 +0200 Subject: [PATCH] restore cpo vim plugin --- vim/plugin/himalaya.vim | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/vim/plugin/himalaya.vim b/vim/plugin/himalaya.vim index b3ebbfe..5c0a85c 100644 --- a/vim/plugin/himalaya.vim +++ b/vim/plugin/himalaya.vim @@ -1,11 +1,19 @@ -if exists("g:himalaya_loaded") +if exists("g:loaded_himalaya") finish endif -let g:himalaya_loaded = 1 - if !executable("himalaya") throw "Himalaya CLI not found, see https://github.com/soywod/himalaya#installation" endif +" Backup cpo +let s:cpo_backup = &cpo +set cpo&vim + command! -nargs=* Himalaya call himalaya#msg#list() + +" Restore cpo +let &cpo = s:cpo_backup +unlet s:cpo_backup + +let g:loaded_himalaya = 1