From d94a5ac06dadc7436fe732dcdfc3f6251b5404de Mon Sep 17 00:00:00 2001 From: totem4 Date: Fri, 2 Oct 2020 14:31:55 +0200 Subject: [PATCH] add temporary exception --- plugin/banana.vim | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/plugin/banana.vim b/plugin/banana.vim index 54432d0..6c6f17f 100644 --- a/plugin/banana.vim +++ b/plugin/banana.vim @@ -26,7 +26,10 @@ fun! s:Enc() python3 << EOL from banana import text2banana,get_selected_text,replace_selected_text -replace_selected_text(text2banana(get_selected_text())) +try: + replace_selected_text(text2banana(get_selected_text())) +except: + print("banana: select the text you want to convert") EOL endfun! @@ -41,4 +44,4 @@ EOL endfun! let &cpo= s:keepcpo -unlet s:keepcpo \ No newline at end of file +unlet s:keepcpo