Start Vim with $ vim --clean.
Run the following command:
:autocmd! ColorScheme * echomsg '<amatch>: ' . expand('<amatch>') . ' g:colors_name: ' . g:colors_name
Change to an existing colorscheme:
:color desert
Do :mess to see the message:
<amatch>: desert g:colors_name: desert
Change to a non-existing colorscheme:
:color hsgdyourtd
Get unexpected message and expected error:
<amatch>: hsgdyourtd g:colors_name: desert
E185: Cannot find color scheme 'hsgdyourtd'
Press ENTER or type command to continue
I would expect the autocommand to not be triggered.
:help ColorScheme says:
After loading a color scheme. |:colorscheme| The pattern is matched against the colorscheme name.
<afile>can be used for the name of the actual file where this option was set, and<amatch>for the new colorscheme name.
g:colors_name and there is no "colorscheme name" to speak of, so <amatch> shouldn't have the value of the :colorscheme argument.All
Irrelevant
No response
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
Closed #11024 as completed via 5d09a40.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()