Align hex byte preview column with value column using dynamic nameW

This commit is contained in:
sysadmin
2026-02-12 13:54:52 -07:00
parent 4b1d3e9d3f
commit b0aa7cda67
3 changed files with 14 additions and 22 deletions

View File

@@ -655,9 +655,8 @@ void RcxEditor::applyDataChangedHighlight(const QVector<LineMeta>& meta) {
// Per-byte highlighting in ASCII + hex areas
int ind = kFoldCol + lm.depth * 3;
int asciiStart = ind + typeW + kSepWidth;
// Hex8-64: ASCII always padded to 8; Padding: ASCII = lineByteCount chars
int asciiWidth = (lm.nodeKind == NodeKind::Padding) ? lm.lineByteCount : 8;
int hexStart = asciiStart + asciiWidth + kSepWidth;
// ASCII column is padded to nameW (aligned with value column)
int hexStart = asciiStart + nameW + kSepWidth;
for (int byteIdx : lm.changedByteIndices) {
// Highlight in ASCII area (1 char per byte)