* 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)
| 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 | * |
no test coverage detected