mirror of
https://github.com/vim-airline/vim-airline.git
synced 2025-07-31 01:44:58 +02:00
parent
25635ab504
commit
82eea250e3
@ -186,6 +186,10 @@ if !exists(":def") || !airline#util#has_vim9_script()
|
|||||||
call <sid>exec_separator({}, a:from, a:to, a:inverse, '')
|
call <sid>exec_separator({}, a:from, a:to, a:inverse, '')
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
function! airline#highlighter#remove_separators_for_bufnr(bufnr) abort
|
||||||
|
call filter(s:separators, 'stridx(v:key, a:bufnr) < 0')
|
||||||
|
endfunction
|
||||||
|
|
||||||
function! s:exec_separator(dict, from, to, inverse, suffix) abort
|
function! s:exec_separator(dict, from, to, inverse, suffix) abort
|
||||||
if pumvisible()
|
if pumvisible()
|
||||||
return
|
return
|
||||||
@ -529,6 +533,10 @@ else
|
|||||||
s:exec_separator({}, from, to, inverse, '')
|
s:exec_separator({}, from, to, inverse, '')
|
||||||
enddef
|
enddef
|
||||||
|
|
||||||
|
def airline#highlighter#remove_separators_for_bufnr(bufnr: string): void
|
||||||
|
filter(s:separators, (k, v) => stridx(k, bufnr) < 0)
|
||||||
|
enddef
|
||||||
|
|
||||||
def s:exec_separator(dict: dict<any>, from_arg: string, to_arg: string, inverse: bool, suffix: string): void
|
def s:exec_separator(dict: dict<any>, from_arg: string, to_arg: string, inverse: bool, suffix: string): void
|
||||||
if pumvisible()
|
if pumvisible()
|
||||||
return
|
return
|
||||||
@ -681,5 +689,5 @@ else
|
|||||||
endfor
|
endfor
|
||||||
endif
|
endif
|
||||||
endfor
|
endfor
|
||||||
enddef
|
enddef
|
||||||
endif
|
endif
|
||||||
|
@ -72,6 +72,10 @@ function! s:on_window_changed(event)
|
|||||||
let g:airline_last_window_changed = l:key
|
let g:airline_last_window_changed = l:key
|
||||||
call s:init()
|
call s:init()
|
||||||
call airline#update_statusline()
|
call airline#update_statusline()
|
||||||
|
|
||||||
|
if a:event ==# 'BufUnload'
|
||||||
|
call airline#highlighter#remove_separators_for_bufnr(expand('<abuf>'))
|
||||||
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:on_focus_gained()
|
function! s:on_focus_gained()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user