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
Editor: an emphasis keeps painting its last path after its range stops laying out #2341
EmphasisManager.updateLayerBackgrounds() skips an emphasis whose makeShapePath returns nil, which leaves that emphasis's CAShapeLayer holding the path it last had. When the range stops laying out, because the text under it was edited or its line was invalidated, the highlight or underline keeps painting at its old position, over whatever text now occupies it.
This is pre-existing for .standard and .outline, where roundedPathForRange already returned nil, and #2338 extends it to .underline.
The arguably correct behaviour is to clear emphasis.layer.path and hide the text layer before skipping, so nothing is drawn when there is nothing to draw. The risk is flicker: an attribute-only edit invalidates lines, so a find highlight could blink off and back on during ordinary syntax highlighting traffic. That needs measuring before it ships, which is why it is not in #2338.
Activity