From 3a2323feac6b89f07c35f268db10b0e54fc7e196 Mon Sep 17 00:00:00 2001 From: Christian Brabandt Date: Fri, 5 Jan 2018 08:12:10 +0100 Subject: [PATCH] branch: shorten default master for smaller windows --- autoload/airline/extensions/branch.vim | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/autoload/airline/extensions/branch.vim b/autoload/airline/extensions/branch.vim index 25ebe0a..a32b880 100644 --- a/autoload/airline/extensions/branch.vim +++ b/autoload/airline/extensions/branch.vim @@ -95,6 +95,10 @@ function! s:update_git_branch() endif let s:vcs_config['git'].branch = fugitive#head(s:sha1size) + if s:vcs_config['git'].branch is# 'master' && winwidth(0) < 81 + " Shorten default a bit + let s:vcs_config['git'].branch='mas' + endif endfunction function! s:display_git_branch()