You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Startup briefly paints a light colorscheme before the terminal’s dark background response #21605
Start vim and observe that Vim briefly displays the light variant before switching to the dark variant. vim -Nu /tmp/minimal.vim -i NONE -c 'redraw! | sleep 2' makes this very visible.
I originally encountered this with everforest. Vim correct detects the appropriate 'background', but the problem is the light-to-dark flash during startup.
Expected behaviour
The first paint should match the terminal's (dark) background, without the brief (light) flash.
The detection should work automatically for both light and dark background. Setting e.g. background=dark avoids the flash but prevents automatic adapting to light terminals.
I'm familiar with COLORFGBG. The issue is about vim's own background color detection at startup.
Relying on COLORFGBG would mean moving the problem elsewhere (e.g. to the shell), which would need to update COLORFGBG whenever the terminal's colors changed.
Activity
vim: preserve the startup synchronized frame
mao-yining commentedon Oct 20, 2026
try set
$COLORFGBG=15;0in bashrcjparise commentedon Oct 20, 2026
I'm familiar with
COLORFGBG. The issue is about vim's own background color detection at startup.Relying on
COLORFGBGwould mean moving the problem elsewhere (e.g. to the shell), which would need to updateCOLORFGBGwhenever the terminal's colors changed.akasakariko commentedon Oct 26, 2026
I'd like to work on this
dkearns commentedon Oct 26, 2026
@akasakariko, thanks it's all yours.
Light-background flash on startup in dark terminals
Terminal background detection delays startup by default
Terminal background detection can introduce unnecessary startup delays
Waiting for a terminal background color response can delay startup
Terminal color responses can suppress SafeState after startup
Light-background flash on startup in dark terminals
Light-background flash on startup in dark terminals
patch 9.2.1375: Light-background flash on startup in dark terminals
vim: set 'termbackgroundwait' when available