From 467d3e14a81f01475922461a9a04ccbca9ee940b Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Thu, 4 May 2017 22:32:08 +0200 Subject: whitespace-method-chain: Silence commands If the commands result in errors, they should fail silently, because we may have exected them on things that don't match, like a line that has no '.'s or a single-line buffer. --- bundle/whitespace-method-chain/autoload/whitespace_method_chain.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bundle/whitespace-method-chain/autoload/whitespace_method_chain.vim') diff --git a/bundle/whitespace-method-chain/autoload/whitespace_method_chain.vim b/bundle/whitespace-method-chain/autoload/whitespace_method_chain.vim index 9e7e00b..fc58c21 100644 --- a/bundle/whitespace-method-chain/autoload/whitespace_method_chain.vim +++ b/bundle/whitespace-method-chain/autoload/whitespace_method_chain.vim @@ -5,8 +5,8 @@ function! whitespace_method_chain#SplitMethodChainToMultipleLines() let indent = matchstr(line, '\v^\s+') " Replace '.' with newlines and the correct amount of indentation - substitute/\V./\=' ' . indent . '.'/g + silent! substitute/\V./\=' ' . indent . '.'/g " Indent new lines - '`+1,.> + silent! '`+1,.> endfunction -- cgit v1.2.3