mirror of
https://github.com/vim-airline/vim-airline.git
synced 2025-12-06 20:24:27 +08:00
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:
@@ -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']
|
||||
|
||||
Reference in New Issue
Block a user