mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-04 07:36:50 +00:00
If something happens in response to on_change that causes the widget to get unparented, creating a GUI::Painter will fail since it can't find the window to paint into. Since painting only cares about the syntax highlighting spans, what we really want is to ensure that spans are up-to-date before we start painting. The problem was that rehighlighting and the on_change hook were bundled together in an awkward lazy update mechanism. This patch fixes that by decoupling rehighlighting and on_change. Rehighlighting is now lazy and only happens when we handle either paint or mouse events. :^) Fixes #8302.
64 KiB
64 KiB