make _replaceRange internal only
This commit is contained in:
parent
4c04bc19c9
commit
7a01d1407f
2 changed files with 3 additions and 3 deletions
|
@ -401,8 +401,8 @@ export default class EditorModel {
|
||||||
return new Range(this, positionA, positionB);
|
return new Range(this, positionA, positionB);
|
||||||
}
|
}
|
||||||
|
|
||||||
//mostly internal, called from Range.replace
|
// called from Range.replace
|
||||||
replaceRange(startPosition, endPosition, parts) {
|
_replaceRange(startPosition, endPosition, parts) {
|
||||||
// convert end position to offset, so it is independent of how the document is split into parts
|
// convert end position to offset, so it is independent of how the document is split into parts
|
||||||
// which we'll change when splitting up at the start position
|
// which we'll change when splitting up at the start position
|
||||||
const endOffset = endPosition.asOffset(this);
|
const endOffset = endPosition.asOffset(this);
|
||||||
|
|
|
@ -58,7 +58,7 @@ export default class Range {
|
||||||
this._start.iteratePartsBetween(this._end, this._model, (part, startIdx, endIdx) => {
|
this._start.iteratePartsBetween(this._end, this._model, (part, startIdx, endIdx) => {
|
||||||
oldLength += endIdx - startIdx;
|
oldLength += endIdx - startIdx;
|
||||||
});
|
});
|
||||||
this._model.replaceRange(this._start, this._end, parts);
|
this._model._replaceRange(this._start, this._end, parts);
|
||||||
return newLength - oldLength;
|
return newLength - oldLength;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue