mirror of
https://github.com/itchyny/lightline.vim.git
synced 2025-11-15 23:13:51 -05:00
change events for updating the statusline, from BufWinEnter,FileType to BufEnter (close #352)
- fix the active statusline after updating the quickfix/location list - use g:qf_disable_statusline to disable the statusline of the default ftplugin - for before Vim 8.1.1715, keep using FileType event to overwrite the statusline of the quickfix window
This commit is contained in:
25
test/quickfix.vim
Normal file
25
test/quickfix.vim
Normal file
@@ -0,0 +1,25 @@
|
||||
let s:suite = themis#suite('quickfix')
|
||||
let s:assert = themis#helper('assert')
|
||||
|
||||
function! s:suite.before_each()
|
||||
let g:lightline = {}
|
||||
call lightline#init()
|
||||
tabnew
|
||||
tabonly
|
||||
endfunction
|
||||
|
||||
function! s:suite.quickfix_statusline()
|
||||
call setloclist(winnr(), [])
|
||||
lopen
|
||||
wincmd p
|
||||
call setloclist(winnr(), [])
|
||||
for n in range(1, winnr('$'))
|
||||
let statusline = getwinvar(n, '&statusline')
|
||||
call s:assert.match(statusline, 'lightline')
|
||||
if has('patch-8.1.1715')
|
||||
call s:assert.match(statusline, n == 1 ? '_active_' : '_inactive_')
|
||||
else
|
||||
call s:assert.match(statusline, n != 1 ? '_active_' : '_inactive_')
|
||||
endif
|
||||
endfor
|
||||
endfunction
|
||||
Reference in New Issue
Block a user