When viewing an empty (command, search, etc.) history table, the standard vim statusline is used instead of lightline.vim's statusline.
Nonempty history table:
Empty history table:
Sample vimrc:
call plug#begin('~/.vim/plugged')
Plug 'itchyny/lightline.vim'
call plug#end()
set nocompatible
set history=10
set laststatus=2
Commands run:
bash-$ vim -i NONE -u <SAMPLE_VIMRC> # then view vim's (empty) command history
Yeah, I've got this report some weeks ago. This should fixed by https://github.com/vim/vim/pull/4762 and also working on some fix in this plugin.
The problem of just using CmdWinEnter is that there's no event to update after closing the command line window. The event CmdWinLeave is fired before closing the window so the plugin fails to update the active window statusline.
My patch to Vim was included as Vim 8.1.2017 (see https://github.com/vim/vim/commit/96e38a86a710fb6daec4550ac1667f019dc3a40e), so please update Vim. There's no consistent fix for older versions of Vim so I decided not to make a fix in this plugin. Thanks for reporting.
Thank you for your work!