terminal: use mode() to detect terminal mode

workaround with index(term_list(), bufnr('')) > -1 not needed anymore,
since vim 8.0.936 will correctly return 't' for the mode() function in
the terminal.
This commit is contained in:
Christian Brabandt 2017-08-14 16:39:48 +02:00
parent 3535243c50
commit e5f9ccad8e
No known key found for this signature in database
GPG Key ID: F3F92DA383FDDE09
1 changed files with 0 additions and 3 deletions

View File

@ -152,9 +152,6 @@ function! airline#check_mode(winnr)
if get(w:, 'airline_active', 1)
let l:m = mode()
if exists("*term_list") && index(term_list(), bufnr('')) > -1
let l:m = "t"
endif
if l:m ==# "i"
let l:mode = ['insert']
elseif l:m ==# "R"