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

Method removeNewLine

src/document.js:465–474  ·  view source on GitHub ↗

* Removes the new line between `row` and the row immediately following it. This method also triggers the `"change"` event. * @param {Number} row The row to check *

(row)

Source from the content-addressed store, hash-verified

463 *
464 **/
465 removeNewLine(row) {
466 if (row < this.getLength() - 1 && row >= 0) {
467 this.applyDelta({
468 start: this.pos(row, this.getLine(row).length),
469 end: this.pos(row + 1, 0),
470 action: "remove",
471 lines: ["", ""]
472 });
473 }
474 }
475
476 /**
477 * Replaces a range in the document with the new `text`.

Callers 2

document_test.jsFile · 0.80
anchor_test.jsFile · 0.80

Calls 4

getLengthMethod · 0.95
applyDeltaMethod · 0.95
posMethod · 0.95
getLineMethod · 0.95

Tested by

no test coverage detected