| 769 | } |
| 770 | |
| 771 | void RcxEditor::applyDataChangedHighlight(const QVector<LineMeta>& meta) { |
| 772 | for (int i = 0; i < meta.size(); i++) { |
| 773 | if (!meta[i].dataChanged) continue; |
| 774 | if (isSyntheticLine(meta[i])) continue; |
| 775 | |
| 776 | const LineMeta& lm = meta[i]; |
| 777 | int typeW = lm.effectiveTypeW; |
| 778 | int nameW = lm.effectiveNameW; |
| 779 | |
| 780 | if (isHexPreview(lm.nodeKind) && !lm.changedByteIndices.isEmpty()) { |
| 781 | // Per-byte highlighting in ASCII + hex areas |
| 782 | int ind = kFoldCol + lm.depth * 3; |
| 783 | int asciiStart = ind + typeW + kSepWidth; |
| 784 | // ASCII column is padded to nameW (aligned with value column) |
| 785 | int hexStart = asciiStart + nameW + kSepWidth; |
| 786 | |
| 787 | for (int byteIdx : lm.changedByteIndices) { |
| 788 | // Highlight in ASCII area (1 char per byte) |
| 789 | fillIndicatorCols(IND_DATA_CHANGED, i, asciiStart + byteIdx, asciiStart + byteIdx + 1); |
| 790 | // Highlight in hex area (2 hex chars per byte at position byteIdx*3) |
| 791 | int hexCol = hexStart + byteIdx * 3; |
| 792 | fillIndicatorCols(IND_DATA_CHANGED, i, hexCol, hexCol + 2); |
| 793 | } |
| 794 | } else { |
| 795 | // Non-hex nodes: highlight entire value span |
| 796 | QString lineText = getLineText(m_sci, i); |
| 797 | ColumnSpan vs = valueSpan(lm, lineText.size(), typeW, nameW); |
| 798 | if (vs.valid) |
| 799 | fillIndicatorCols(IND_DATA_CHANGED, i, vs.start, vs.end); |
| 800 | } |
| 801 | } |
| 802 | } |
| 803 | |
| 804 | void RcxEditor::applyBaseAddressColoring(const QVector<LineMeta>& meta) { |
| 805 | if (meta.isEmpty() || meta[0].lineKind != LineKind::CommandRow) return; |
nothing calls this directly
no test coverage detected