fix: don't render bidi isolates LRI, RLI, FSI, PDI (#18942)

Skips rendering LRI, RLI, FSI, and PDI "glyphs" in the terminal.

Does not implement BIDI/RTL; that is out of scope, see #538. This is
just a hotfix to stop spamming the console with undesired character
printouts. Once BIDI support is implemented, this change will (maybe?)
no longer be necessary.

Fixes #16574.

(cherry picked from commit 59590fc6657ece06ef7d2006f5fd5907b1ba1828)
Service-Card-Id: PVTI_lADOAF3p4s4AxadtzgeAsaA
Service-Version: 1.23
This commit is contained in:
Adaline Valentina Simonian 2025-05-30 10:06:39 -07:00 committed by Dustin L. Howett
parent 8701c4ffa0
commit 55cb7049ed

View File

@ -500,8 +500,13 @@ try
{
for (const auto& cluster : clusters)
{
for (const auto& ch : cluster.GetText())
for (auto ch : cluster.GetText())
{
// Render Unicode directional isolate characters (U+2066..U+2069) as zero-width spaces.
if (ch >= L'\u2066' && ch <= L'\u2069')
{
ch = L'\u200B';
}
_api.bufferLine.emplace_back(ch);
_api.bufferLineColumn.emplace_back(columnEnd);
}