mirror of
https://github.com/vim-airline/vim-airline.git
synced 2025-12-07 20:54:26 +08:00
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:
@@ -152,9 +152,6 @@ function! airline#check_mode(winnr)
|
|||||||
|
|
||||||
if get(w:, 'airline_active', 1)
|
if get(w:, 'airline_active', 1)
|
||||||
let l:m = mode()
|
let l:m = mode()
|
||||||
if exists("*term_list") && index(term_list(), bufnr('')) > -1
|
|
||||||
let l:m = "t"
|
|
||||||
endif
|
|
||||||
if l:m ==# "i"
|
if l:m ==# "i"
|
||||||
let l:mode = ['insert']
|
let l:mode = ['insert']
|
||||||
elseif l:m ==# "R"
|
elseif l:m ==# "R"
|
||||||
|
|||||||
Reference in New Issue
Block a user