From 99f6f36b69e90fe6376fee7fd917f7e6b0f26e87 Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Thu, 4 Sep 2014 14:10:33 +0900 Subject: [PATCH] Do not print 'D'-message when there was no update (#66) This commit assumes that the git pull command prints 'Already up-to-date' when the repository is up-to-date. Let's just hope that it doesn't change in the future. --- plug.vim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plug.vim b/plug.vim index 708b1a7..5aef8f5 100644 --- a/plug.vim +++ b/plug.vim @@ -558,7 +558,8 @@ function! s:finish(pull) if !empty(s:prev_update.errors) call add(msgs, "Press 'R' to retry.") endif - if a:pull + if a:pull && !empty(filter(getline(5, '$'), + \ "v:val =~ '^- ' && stridx(v:val, 'Already up-to-date') < 0")) call add(msgs, "Press 'D' to see the updated changes.") endif echo join(msgs, ' ')