From 0db69f4658704ff6ddbc69df6be36ec43416044a Mon Sep 17 00:00:00 2001 From: Marco Hinz Date: Mon, 23 Jan 2017 02:58:40 +0100 Subject: [PATCH] Fix CVS References #205. --- autoload/sy/repo.vim | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/autoload/sy/repo.vim b/autoload/sy/repo.vim index d364d28..80a37ee 100644 --- a/autoload/sy/repo.vim +++ b/autoload/sy/repo.vim @@ -148,9 +148,15 @@ endfunction " Function: #get_diff_cvs {{{1 function! sy#repo#get_diff_cvs(exitval, diff, do_register) abort call sy#verbose('get_diff_cvs()', 'cvs') - let [found_diff, diff] = ((a:exitval == 1) && (a:diff =~ '+++')) - \ ? [1, diff] - \ : [0, ''] + let [found_diff, diff] = [0, ''] + if a:exitval == 1 + for diffline in a:diff + if diffline =~ '+++' + let [found_diff, diff] = [1, a:diff] + break + endif + endfor + endif call s:get_diff_end(found_diff, 'cvs', diff, a:do_register) endfunction