From a899077bf5e3f5f816505a1fdbf81990768dcae9 Mon Sep 17 00:00:00 2001 From: Alex Yatskov Date: Thu, 12 Mar 2015 15:45:46 +0900 Subject: [PATCH] Better handling of spaces during unwrapping. --- autoload/argwrap.vim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/autoload/argwrap.vim b/autoload/argwrap.vim index 871cd1e..0c0a95b 100644 --- a/autoload/argwrap.vim +++ b/autoload/argwrap.vim @@ -82,7 +82,8 @@ function! argwrap#extractContainerArgText(range) endif if l:extractStart < l:extractEnd - let l:text .= l:lineText[l:extractStart : l:extractEnd - 1] + let l:extract = l:lineText[l:extractStart : l:extractEnd - 1] + let l:text .= substitute(l:extract, '^\s*\(.\{-}\)\s*$', '\1 ', '') endif endfor