@Override
	public FieldLocation getFieldLocation(ListingField bf, BigInteger index, int fieldNum,
			ProgramLocation loc) {

		if (!(loc instanceof BytesFieldLocation)) {
			return null;
		}
		Object obj = bf.getProxy().getObject();
		if (!(obj instanceof CodeUnit)) {
			return null;
		}

		CodeUnit cu = (CodeUnit) obj;
		BytesFieldLocation bytesLoc = (BytesFieldLocation) loc;
		int byteIndex = bytesLoc.getByteIndex();
		int columnInByte = bytesLoc.getColumnInByte();

		int size = cu.getLength();
		int residual = size % byteGroupSize;

		if (!displayStructureAlignmentBytes && byteIndex >= size) {
			byteIndex = size - 1;
			columnInByte = 2;
		}

		int tokenIndex = byteIndex / byteGroupSize;
		int tokenOffset = (byteIndex % byteGroupSize) * 2 + columnInByte;

		// compensate for split group containing optional alignment bytes
		if (byteIndex >= size && residual != 0) {
			if ((byteIndex - size) < (byteGroupSize - residual)) {
				tokenOffset -= (residual * CHARS_IN_BYTE);
			}
			++tokenIndex;
		}

		ListingTextField btf = (ListingTextField) bf;
		RowColLocation rcl = btf.dataToScreenLocation(tokenIndex, tokenOffset);
		if (hasSamePath(bf, loc)) {
			return new FieldLocation(index, fieldNum, rcl.row(), rcl.col());
		}
		return null;
	}
Computes the character offset for a BytesFieldLocation based on the character column the
cursor is at in the token.  BytesFieldLocation character offsets are always as if the group
size is 1. So for all positions except the last byte, it is just the column modulo 2.  For
the last byte, we have to account for any columns past the last char.  In this case, we have
to subtract off 2 for every byte before the last byte.
Ghidra/Features/Base/src/main/java/ghidra/app/util/viewer/field/BytesFieldFactory.java