mirror of
https://github.com/vim-airline/vim-airline.git
synced 2025-07-16 18:44:40 +02:00
fix the lazyredraw requirement
This commit is contained in:
parent
9594e83236
commit
81c2dc1f9d
@ -24,10 +24,6 @@ i wrote the initial version on an airplane, and since it's light as air it turne
|
|||||||
|
|
||||||
`:help airline`
|
`:help airline`
|
||||||
|
|
||||||
# prerequisites
|
|
||||||
|
|
||||||
for this plugin to work properly `lazyredraw` needs to be set. during development i had this on the entire time, and it turns out that this has a major impact in colors being able to change prompty (ironic that lazy == eager here). i'm still tracking down the cause and hopefully in the future this requirement can be removed.
|
|
||||||
|
|
||||||
# faq/troubleshooting
|
# faq/troubleshooting
|
||||||
|
|
||||||
1. the powerline font symbols are not showing up
|
1. the powerline font symbols are not showing up
|
||||||
|
@ -3,9 +3,6 @@ if &cp || v:version < 702 || (exists('g:loaded_airline') && g:loaded_airline)
|
|||||||
finish
|
finish
|
||||||
endif
|
endif
|
||||||
let g:loaded_airline = 1
|
let g:loaded_airline = 1
|
||||||
if !&lazyredraw
|
|
||||||
echom 'for the time being, vim-airline needs lazyredraw enabled to work properly.'
|
|
||||||
endif
|
|
||||||
function! s:check_defined(variable, default)
|
function! s:check_defined(variable, default)
|
||||||
if !exists(a:variable)
|
if !exists(a:variable)
|
||||||
let {a:variable} = a:default
|
let {a:variable} = a:default
|
||||||
@ -37,13 +34,13 @@ call s:check_defined('g:airline_mode_map', {
|
|||||||
\ '' : 'V-BLCK',
|
\ '' : 'V-BLCK',
|
||||||
\ })
|
\ })
|
||||||
let s:airline_highlight_map = {
|
let s:airline_highlight_map = {
|
||||||
\ 'mode' : 'User2',
|
\ 'mode' : 'Al2',
|
||||||
\ 'mode_separator' : 'User3',
|
\ 'mode_separator' : 'Al3',
|
||||||
\ 'info' : 'User4',
|
\ 'info' : 'Al4',
|
||||||
\ 'info_separator' : 'User5',
|
\ 'info_separator' : 'Al5',
|
||||||
\ 'statusline' : 'User6',
|
\ 'statusline' : 'Al6',
|
||||||
\ 'file' : 'User8',
|
\ 'file' : 'Al8',
|
||||||
\ 'inactive' : 'User9',
|
\ 'inactive' : 'Al9',
|
||||||
\ }
|
\ }
|
||||||
let s:airline_highlight_groups = keys(s:airline_highlight_map)
|
let s:airline_highlight_groups = keys(s:airline_highlight_map)
|
||||||
|
|
||||||
@ -102,12 +99,12 @@ function! s:update_statusline(active)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
call s:update_externals()
|
call s:update_externals()
|
||||||
let l:mode_color = a:active ? "%2*" : "%9*"
|
let l:mode_color = a:active ? "%#Al2#" : "%#Al9#"
|
||||||
let l:mode_sep_color = a:active ? "%3*" : "%9*"
|
let l:mode_sep_color = a:active ? "%#Al3#" : "%#Al9#"
|
||||||
let l:info_color = a:active ? "%4*" : "%9*"
|
let l:info_color = a:active ? "%#Al4#" : "%#Al9#"
|
||||||
let l:info_sep_color = a:active ? "%5*" : "%9*"
|
let l:info_sep_color = a:active ? "%#Al5#" : "%#Al9#"
|
||||||
let l:status_color = a:active ? "%6*" : "%9*"
|
let l:status_color = a:active ? "%#Al6#" : "%#Al9#"
|
||||||
let l:file_flag_color = a:active ? "%8*" : "%9*"
|
let l:file_flag_color = a:active ? "%#Al7#" : "%#Al9#"
|
||||||
|
|
||||||
let sl = l:mode_color
|
let sl = l:mode_color
|
||||||
let sl.= a:active
|
let sl.= a:active
|
||||||
|
Loading…
x
Reference in New Issue
Block a user