Add a terminal statusline function for vim

This commit is contained in:
Christian Brabandt
2017-09-27 20:28:16 +02:00
parent bd613e69b6
commit 0ad4f97c1a
4 changed files with 44 additions and 1 deletions
+3 -1
View File
@@ -49,7 +49,9 @@ function! s:prototype.build() dict
let contents = section[1]
let pgroup = prev_group
let prev_group = s:get_prev_group(self._sections, i)
if group ==# 'airline_c' && !self._context.active && has_key(self._context, 'bufnr')
if group ==# 'airline_c' && &buftype ==# 'terminal' && self._context.active
let group = 'airline_term'
elseif group ==# 'airline_c' && !self._context.active && has_key(self._context, 'bufnr')
let group = 'airline_c'. self._context.bufnr
elseif prev_group ==# 'airline_c' && !self._context.active && has_key(self._context, 'bufnr')
let prev_group = 'airline_c'. self._context.bufnr