From ca302f723317d31c7586a04e67b9508a0c39a972 Mon Sep 17 00:00:00 2001 From: James McCoy Date: Tue, 23 Feb 2016 09:37:52 -0500 Subject: [PATCH] Replace all modifiers in a vcs_cmd string, not just the first. Closes #176 Signed-off-by: James McCoy --- autoload/sy/repo.vim | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/autoload/sy/repo.vim b/autoload/sy/repo.vim index ce36349..8721c55 100644 --- a/autoload/sy/repo.vim +++ b/autoload/sy/repo.vim @@ -166,12 +166,8 @@ endfunction " Function: s:replace {{{1 function! s:replace(cmd, pat, sub) - let tmp = split(a:cmd, a:pat, 1) - if len(tmp) > 1 - return tmp[0] . a:sub . tmp[1] - else - return a:cmd - endif + let parts = split(a:cmd, a:pat, 1) + return join(parts, a:sub) endfunction " Function: s:strip_context {{{1