Browse Source

Only add offsets for LeftToRight runs

pull/8626/head
Benedikt Stebner 4 years ago
parent
commit
adc81678ca
  1. 8
      src/Avalonia.Base/Media/TextFormatting/TextLineImpl.cs

8
src/Avalonia.Base/Media/TextFormatting/TextLineImpl.cs

@ -266,10 +266,10 @@ namespace Avalonia.Media.TextFormatting
{
offset = Math.Max(0, currentPosition - shapedRun.Text.Start);
}
else
{
offset = Math.Max(0, currentPosition - shapedRun.Text.Start + shapedRun.Text.Length);
}
//else
//{
// offset = Math.Max(0, currentPosition - shapedRun.Text.Start + shapedRun.Text.Length);
//}
characterHit = new CharacterHit(characterHit.FirstCharacterIndex + offset, characterHit.TrailingLength);

Loading…
Cancel
Save