Wide glyphs disappear in `HighlightStates` use-cases
Originally posted by @BDisp in https://github.com/gui-cs/Terminal.Gui/pull/4462#pullrequestreview-3551244234
If the two places in View.Mouse.cs where we do this:
if (HighlightStates != MouseState.None)
{
SetNeedsDraw ();
}
Are changed such that SetNeedsDraw is not called, the bug is not repo. Of course, that also means that highlightstates stops working.
When LayoutAndDraw is called after these SetNeedsDraw calls, the code in Border (and Margin) that deal with HighLightStates, along with this code in GetAttributeForRole:
if (role != VisualRole.Disabled && HighlightStates != MouseState.None)
{
// The default behavior for HighlightStates of MouseState.Over is to use the Highlight role
if (((HighlightStates.HasFlag (MouseState.In) && MouseState.HasFlag (MouseState.In))
|| (HighlightStates.HasFlag (MouseState.Pressed) && MouseState.HasFlag (MouseState.Pressed)))
&& role != VisualRole.Highlight && !HasFocus)
{
schemeAttribute = GetAttributeForRole (VisualRole.Highlight);
}
}
...cause things to be redrawn, but the only thing that actuallyi gets changed are attributes.
This points to another bug in either AddString or OutputImpl.Write regarding writing Cells where only the attribute has changed.
...cause things to be redrawn, but the only thing that actuallyi gets changed are attributes.
This points to another bug in either
AddStringorOutputImpl.Writeregarding writing Cells where only the attribute has changed.
Any change to an attribute logically implies a complete redraw of the cell.
I'm posting this here because I'm not sure if it's related to the same problem. Glyphs disappear when moving the Dialog. If it is not the same problem, please create a new issue.