mirror of
https://github.com/vim-airline/vim-airline.git
synced 2025-02-01 14:35:33 +08:00
mode: keep hi setting when switching from 'n' to 'ni'
when using `Ctrl-O` from insert mode, the highlighting currently updates from insert mode highlighting to normal mode highlighting. Unfortunately, changing the highlighting can be a bit expansive, so redefining the highlighting just for one simple command does not make too much sense. Instead, keep the insert mode highlighting, because that's kind of like the major mode Vim is in currently. The mode message uses '(INSERT)' to distinguish between a "normal" INSERT mode and this temporary INSERT mode, so it should still be visually be distinguishable. closes #2217
This commit is contained in:
parent
5d3cfa4045
commit
0f5eedff74
|
@ -221,7 +221,7 @@ function! airline#check_mode(winnr)
|
||||||
elseif l:m ==# "no" " does not work, most likely, Vim does not refresh the statusline in OP mode
|
elseif l:m ==# "no" " does not work, most likely, Vim does not refresh the statusline in OP mode
|
||||||
let l:mode = ['normal']
|
let l:mode = ['normal']
|
||||||
elseif l:m[0:1] ==# 'ni'
|
elseif l:m[0:1] ==# 'ni'
|
||||||
let l:mode = ['normal']
|
let l:mode = ['insert']
|
||||||
let l:m = 'ni'
|
let l:m = 'ni'
|
||||||
else
|
else
|
||||||
let l:mode = ['normal']
|
let l:mode = ['normal']
|
||||||
|
|
Loading…
Reference in New Issue
Block a user