mirror of
https://github.com/itchyny/lightline.vim.git
synced 2025-11-16 15:33:49 -05:00
- 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
23 lines
499 B
Plaintext
23 lines
499 B
Plaintext
let s:sids = {}
|
|
function! s:sid(path) abort
|
|
if has_key(s:sids, a:path)
|
|
return s:sids[a:path]
|
|
endif
|
|
redir => scriptnames
|
|
silent! scriptnames
|
|
redir END
|
|
for line in split(scriptnames, '\n')
|
|
if line =~# a:path
|
|
let sid = matchstr(line, '\v^\s*\zs\d+\ze')
|
|
let s:sids[a:path] = sid
|
|
return sid
|
|
endif
|
|
endfor
|
|
endfunction
|
|
|
|
function! SID(name) abort
|
|
return function(printf("\<SNR>%d_%s", s:sid('autoload/lightline.vim'), a:name))
|
|
endfunction
|
|
|
|
filetype plugin on
|