This repository has been archived on 2024-06-20. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
lightline.vim/test/quickfix.vim
itchyny 1afe1e9bd5 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
2019-07-30 21:23:20 +09:00

25 lines
658 B
VimL

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