List<StyleRange> mergeRanges(List<Long> changeRanges, List<Integer> highlightRanges)
    {
        if (!mergerInit(changeRanges, highlightRanges)) {
            return null;
        }
        List<StyleRange> result = new ArrayList<>();
        mergerNext();
        int start = mergeRangesPosition;
        boolean blue = mergeRangesIsBlue;
        boolean highlight = mergeRangesIsHighlight;
        while (mergerNext()) {
            if (blue || highlight) {
                result.add(new StyleRange(start, mergeRangesPosition - start, blue ? HexEditThemeSettings.instance.colorText : null,
                    highlight ? colorHighlightText : null));
            }
            start = mergeRangesPosition;
            blue = mergeRangesIsBlue;
            highlight = mergeRangesIsHighlight;
        }

        return result;
    }
Merge ranges of changes in file with ranges of highlighted elements.
Finds lowest range border, finds next lowest range border. That's the first result. Keeps going
until last range border.

@return list of StyleRanges, each with a style of type 'changed', 'highlighted', or both.
plugins/org.jkiss.dbeaver.ui.editors.hex/src/org/jkiss/dbeaver/ui/editors/binary/HexEditControl.java