MCPcopy Index your code
hub / github.com/ajaxorg/ace / insertInLine

Method insertInLine

src/document.js:254–266  ·  view source on GitHub ↗

* Inserts `text` into the `position` at the current row. This method also triggers the `"change"` event. * * This differs from the `insert` method in two ways: * 1. This does NOT handle newline characters (single-line text only). * 2. This is faster than the `insert` method

(position, text)

Source from the content-addressed store, hash-verified

252 * @returns {Point} Returns the position of the end of the inserted text
253 **/
254 insertInLine(position, text) {
255 var start = this.clippedPos(position.row, position.column);
256 var end = this.pos(position.row, position.column + text.length);
257
258 this.applyDelta({
259 start: start,
260 end: end,
261 action: "insert",
262 lines: [text]
263 }, true);
264
265 return this.clonePos(end);
266 }
267
268 /**
269 *

Callers 5

document_test.jsFile · 0.80
indentRowsMethod · 0.80
commentFunction · 0.80
$adjustRowMethod · 0.80
whitespace.jsFile · 0.80

Calls 4

clippedPosMethod · 0.95
posMethod · 0.95
applyDeltaMethod · 0.95
clonePosMethod · 0.95

Tested by

no test coverage detected