Make mode return only single letter except for virt replace mode

commit bcd37fc115 changed the detection of modes slightly in that it
allowed not only single letters but also several letters.

While in theory, it might be okay to have extra modes displayed like
Insert Completion or Normal Insert, or Operator Pending, let's for now
just revert it to the default. We can always enhance it later if
requested.
This commit is contained in:
Christian Brabandt 2018-09-18 20:00:46 +02:00
parent a1c112cafd
commit 251ed064e8
No known key found for this signature in database
GPG Key ID: F3F92DA383FDDE09
1 changed files with 3 additions and 0 deletions

View File

@ -163,6 +163,9 @@ function! airline#check_mode(winnr)
else
let l:mode = ['normal']
endif
if l:m !=# 'Rv'
let l:m = l:m[0]
endif
let w:airline_current_mode = get(g:airline_mode_map, l:m, l:m)
else
let l:mode = ['inactive']