MCPcopy
hub / github.com/ajaxorg/ace / remove

Method remove

src/document.js:389–399  ·  view source on GitHub ↗

* Removes the `range` from the document. * @param {IRange} range A specified Range to remove * @returns {Point} Returns the new `start` property of the range, which contains `startRow` and `startColumn`. If `range` is empty, this function returns the unmodified value of `range.start`.

(range)

Source from the content-addressed store, hash-verified

387
388 **/
389 remove(range) {
390 var start = this.clippedPos(range.start.row, range.start.column);
391 var end = this.clippedPos(range.end.row, range.end.column);
392 this.applyDelta({
393 start: start,
394 end: end,
395 action: "remove",
396 lines: this.getLinesForRange({start: start, end: end})
397 });
398 return this.clonePos(start);
399 }
400
401 /**
402 * Removes the specified columns from the `row`. This method also triggers a `"change"` event.

Callers 2

setValueMethod · 0.95
replaceMethod · 0.95

Calls 4

clippedPosMethod · 0.95
applyDeltaMethod · 0.95
getLinesForRangeMethod · 0.95
clonePosMethod · 0.95

Tested by

no test coverage detected