Skip to content

Commit b6c9e3f

Browse files
committed
wip
1 parent 17e3ca5 commit b6c9e3f

File tree

3 files changed

+134
-250
lines changed

3 files changed

+134
-250
lines changed

src/buffer/out/Row.cpp

+28
Original file line numberDiff line numberDiff line change
@@ -700,6 +700,34 @@ catch (...)
700700
{
701701
row.SetDoubleBytePadded(colEnd < row._columnCount);
702702
}
703+
704+
if constexpr (false)
705+
{
706+
auto it = row._charOffsets.begin();
707+
uint16_t expected = 0;
708+
709+
for (const auto& s : til::utf16_iterator{ row.GetText() })
710+
{
711+
const auto wide = til::at(s, 0) < 0x80 ? false : IsGlyphFullWidth(s);
712+
713+
if (*it != expected)
714+
{
715+
__debugbreak();
716+
}
717+
++it;
718+
719+
if (wide)
720+
{
721+
if (*it != (expected | CharOffsetsTrailer))
722+
{
723+
__debugbreak();
724+
}
725+
++it;
726+
}
727+
728+
expected = gsl::narrow_cast<uint16_t>(expected + s.size());
729+
}
730+
}
703731
}
704732

705733
// This function represents the slow path of ReplaceCharacters(),

0 commit comments

Comments
 (0)