mirror of
https://github.com/itchyny/lightline.vim.git
synced 2025-11-13 22:13:50 -05:00
Set highlight groups for terminal mode in lightline#highlight()
Fixes #144. I just added the missing terminal mode to modes in lightline#highlight() if neovim is being used.
This commit is contained in:
@@ -217,7 +217,7 @@ function! lightline#highlight(...) abort
|
||||
let [s:lightline.llen, s:lightline.rlen] = [len(c.normal.left), len(c.normal.right)]
|
||||
let [s:lightline.tab_llen, s:lightline.tab_rlen] = [len(has_key(c,'tabline') && has_key(c.tabline, 'left') ? c.tabline.left : c.normal.left), len(has_key(c,'tabline') && has_key(c.tabline, 'right') ? c.tabline.right : c.normal.right)]
|
||||
let h = s:uniq(filter(copy(values(g)), 'v:val !=# "raw"'))
|
||||
let modes = a:0 ? [a:1] : ['normal', 'insert', 'replace', 'visual', 'inactive', 'command', 'select', 'tabline']
|
||||
let modes = a:0 ? [a:1] : extend(['normal', 'insert', 'replace', 'visual', 'inactive', 'command', 'select', 'tabline'], has('nvim') ? ['terminal'] : [])
|
||||
for mode in modes
|
||||
let s:highlight[mode] = 1
|
||||
let d = has_key(c, mode) ? mode : has_key(f, mode) && has_key(c, f[mode]) ? f[mode] : 'normal'
|
||||
|
||||
Reference in New Issue
Block a user