-
Notifications
You must be signed in to change notification settings - Fork 737
Closed
Description
When OutputBufferImpl.FillRect() overwrites cells containing wide characters (e.g., Chinese text), it directly sets cell contents without properly handling wide character invalidation. This causes visual corruption when UI elements like MessageBox borders are drawn over wide character content.
Reproduction
- Display Chinese text (e.g., "你好呀") in a view
- Draw a MessageBox that overlaps the text
- Move mouse over the MessageBox border (triggers HighlightState changes and redraws)
- Observe corrupted rendering where wide characters are partially overwritten
See the ChineseUI scenario in UICatalog for a concrete example.
Root Cause
Without Fix:
FillRect()directly assigns cell values without callingAddStr()- Wide characters that get partially overwritten are not invalidated
- Adjacent cells are not marked dirty
- The second column of a wide character retains stale data
In OutputBufferImpl.FillRect():
#else
Contents [r, c] = new ()
{
Grapheme = rune != default (Rune) ? rune.ToString () : " ",
Attribute = CurrentAttribute,
IsDirty = true
};
#endifMetadata
Metadata
Assignees
Labels
No labels
