From 251ed064e84dc684a944edbe37d3c559af3e02bf Mon Sep 17 00:00:00 2001 From: Christian Brabandt Date: Tue, 18 Sep 2018 20:00:46 +0200 Subject: [PATCH] Make mode return only single letter except for virt replace mode commit bcd37fc1152912 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. --- autoload/airline.vim | 3 +++ 1 file changed, 3 insertions(+) diff --git a/autoload/airline.vim b/autoload/airline.vim index bd813dcc..549c2a98 100644 --- a/autoload/airline.vim +++ b/autoload/airline.vim @@ -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']