diff options
author | Teddy Wing | 2017-05-04 22:32:08 +0200 |
---|---|---|
committer | Teddy Wing | 2017-05-04 22:32:08 +0200 |
commit | 467d3e14a81f01475922461a9a04ccbca9ee940b (patch) | |
tree | c9f1093a7143a86e079b9b1c15ec87f51d964b17 | |
parent | 1c2a58930e368b101e5aae39f469aea0a0f9920d (diff) | |
download | dotvim-467d3e14a81f01475922461a9a04ccbca9ee940b.tar.bz2 |
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.
-rw-r--r-- | bundle/whitespace-method-chain/autoload/whitespace_method_chain.vim | 4 |
1 files changed, 2 insertions, 2 deletions
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 |