Skip to content

Initialize the colors handed to OnSpecialLineColors - #3

Open
TetzkatLipHoka wants to merge 1 commit into
VSoftTechnologies:masterfrom
TetzkatLipHoka:fix/special-line-colors-init
Open

Initialize the colors handed to OnSpecialLineColors#3
TetzkatLipHoka wants to merge 1 commit into
VSoftTechnologies:masterfrom
TetzkatLipHoka:fix/special-line-colors-init

Conversation

@TetzkatLipHoka

Copy link
Copy Markdown

FullRowColors declares SpecialFG/SpecialBG as plain locals and passes them
straight into DoOnSpecialLineColors as var parameters, uninitialized. A
handler is allowed to set only one of the two - the other one then keeps
whatever happened to be on the stack, which in practice renders as black.
Normal text does not show it because the highlighter colours it; only the
fallback used for a special line does.

They are now seeded the way the classic SynEdit does it (Font.Color and
Color). Under an active VCL style those two properties are not the colours
the control is actually drawn with, so the styled colours are taken there
instead, each gated on the matching StyleElements flag.

Built with 13.1.


🤖 Generated with Claude Code

FullRowColors declares SpecialFG/SpecialBG as plain locals and passes them
straight into DoOnSpecialLineColors as var parameters, uninitialized. A
handler is allowed to set only one of the two - the other one then keeps
whatever happened to be on the stack, which in practice renders as black.
Normal text does not show it because the highlighter colours it; only the
fallback used for a special line does.

They are now seeded the way the classic SynEdit does it (Font.Color and
Color). Under an active VCL style those two properties are not the colours
the control is actually drawn with, so the styled colours are taken there
instead, each gated on the matching StyleElements flag.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant