motiejus/dotfiles

Unnamed repository; edit this file 'description' to name the repository.
git clone https://git.jakstys.lt/motiejus/dotfiles.git
Log | Tree | Refs | README | LICENSE

commit f5fc469c0c511a5196b6c2ba565b2b6bf6a9d1aa (tree)
parent cb66611f03e5622fc6a5a85dfcd5c588ac9b32c7
Author: Tim Pope <code@tpope.net>
Date:   Fri,  6 Sep 2019 17:16:19 -0400

Ignore blank buffers in fugitive#Statusline()

Diffstat:
Mautoload/fugitive.vim | 5+++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim @@ -5756,7 +5756,8 @@ endfunction " Section: Statusline function! fugitive#Statusline(...) abort - if empty(s:Dir()) + let dir = s:Dir(bufnr('')) + if empty(dir) return '' endif let status = '' @@ -5764,7 +5765,7 @@ function! fugitive#Statusline(...) abort if len(commit) let status .= ':' . commit[0:6] endif - let status .= '('.FugitiveHead(7).')' + let status .= '('.FugitiveHead(7, dir).')' return '[Git'.status.']' endfunction