I noticed:
1. Error is also in first, If window width is modified
2. No error if don't use TSynEditStringTabExpander.ExpandedString
Error is in TSynEditStringTabExpander.ExpandedString which I modified.
This method is needed? If I type:
function TSynEditStringTabExpander.ExpandedString(Index: integer): string;
var
Line: String;
CharWidths: TPhysicalCharWidths;
i, j, l, ll: Integer;
begin
Result := fSynStrings[Index];
exit;
Is is OK.
Temporary I disabled this method in my editor.
Maybe instead of GetPhysicalCharWidths should be line converted to UTF32 ? Especially, is needed method giving unicode32 code point for cursor position.