Fix undesired normalization of internal structure

It's undesired because it is used in other places to check if a comment
is in the same place.

Change-Id: Ic674acd307dedc1573aae61decaefec2f2b4234b
This commit is contained in:
Ole Rehmsen
2018-11-19 16:12:53 +01:00
parent ba0639b379
commit a4641825be

View File

@@ -167,6 +167,9 @@
const ranges = this.get(['_rangesMap', side, lineNum]) || [];
return ranges
.map(range => {
// Make a copy, so that the normalization below does not mess with
// our map.
range = Object.assign({}, range);
range.end = range.end === -1 ? line.text.length : range.end;
// Normalize invalid ranges where the start is after the end but the