From 21f106fb93e0b5c85de4e7f0c4e33ba8534c2efa Mon Sep 17 00:00:00 2001 From: DarkWiiPlayer Date: Thu, 27 Aug 2020 11:18:03 +0200 Subject: [PATCH] Improve vim statusline blame for uncommitted changes --- vim/plugin/git.vim | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/vim/plugin/git.vim b/vim/plugin/git.vim index c4e9a93..72034e6 100644 --- a/vim/plugin/git.vim +++ b/vim/plugin/git.vim @@ -176,7 +176,11 @@ function s:split_blame_entry(idx, entry) let l:map["commit"]=a:entry[:match(a:entry, " ")-1] let l:map["time"]=strftime("%Y-%d-%m %H:%M:%S", l:map["committer-time"]) let l:map["date"]=strftime("%Y-%d-%m", l:map["committer-time"]) - let l:map["short"]=l:map["commit"][:6]." ".l:map["time"]." ".l:map["author"] + if l:map["author"]=="Not Committed Yet" + let l:map["short"]="(Uncommitted)" + else + let l:map["short"]=l:map["commit"][:6]." ".l:map["time"]." ".l:map["author"] + end return l:map endfun let s:split_blame_entry_ref = funcref("s:split_blame_entry")