mirror of
https://github.com/vim-airline/vim-airline.git
synced 2025-07-23 22:15:28 +02:00
term: get rid of useless variable, add comment
This commit is contained in:
parent
af96e9745f
commit
486b68cb08
@ -3,9 +3,8 @@
|
|||||||
|
|
||||||
scriptencoding utf-8
|
scriptencoding utf-8
|
||||||
|
|
||||||
let name=get(g:airline_mode_map, 't', 't')
|
|
||||||
call airline#parts#define_function('tmode', 'airline#extensions#term#termmode')
|
call airline#parts#define_function('tmode', 'airline#extensions#term#termmode')
|
||||||
call airline#parts#define('terminal', {'text': name, 'accent': 'bold'})
|
call airline#parts#define('terminal', {'text': get(g:airline_mode_map, 't', 't'), 'accent': 'bold'})
|
||||||
let s:section_a = airline#section#create_left(['terminal', 'tmode'])
|
let s:section_a = airline#section#create_left(['terminal', 'tmode'])
|
||||||
|
|
||||||
function! airline#extensions#term#apply(...)
|
function! airline#extensions#term#apply(...)
|
||||||
@ -36,8 +35,9 @@ function! airline#extensions#term#inactive_apply(...)
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! airline#extensions#term#termmode()
|
function! airline#extensions#term#termmode()
|
||||||
let mode=airline#parts#mode()[0]
|
let mode = airline#parts#mode()[0]
|
||||||
if mode ==? 'T'
|
if mode ==? 'T'
|
||||||
|
" don't need to output T, statusline already says "TERMINAL"
|
||||||
let mode=''
|
let mode=''
|
||||||
endif
|
endif
|
||||||
return mode
|
return mode
|
||||||
|
Loading…
x
Reference in New Issue
Block a user