diff --git a/plugin/exchange.vim b/plugin/exchange.vim index 4c6dd9a..54d0ca1 100644 --- a/plugin/exchange.vim +++ b/plugin/exchange.vim @@ -163,7 +163,11 @@ function! s:exchange_clear(...) endfunction function! s:save_reg(name) - return [getreg(a:name), getregtype(a:name)] + try + return [getreg(a:name), getregtype(a:name)] + catch /.*/ + return ['', ''] + endtry endfunction function! s:restore_reg(name, reg)