From 4da8b6738384842c911f2739078591842de89c50 Mon Sep 17 00:00:00 2001 From: Tom McDonald Date: Mon, 22 Dec 2014 14:10:56 +0000 Subject: [PATCH] Suppress errors when restoring invalid registers Particularly for * and + registers when clipboard support is not present. Fixes #31 --- plugin/exchange.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/exchange.vim b/plugin/exchange.vim index e59ddd9..9d5e11d 100644 --- a/plugin/exchange.vim +++ b/plugin/exchange.vim @@ -109,7 +109,7 @@ function! s:save_reg(name) endfunction function! s:restore_reg(name, reg) - call setreg(a:name, a:reg[0], a:reg[1]) + silent! call setreg(a:name, a:reg[0], a:reg[1]) endfunction function! s:highlight(exchange)