(startRow, endRow, lines)
| 88 | } |
| 89 | |
| 90 | replaceLines (startRow, endRow, lines) { |
| 91 | const lastRow = this.getLastRow() |
| 92 | if (endRow > lastRow) { |
| 93 | const lastLine = this.getLine(lastRow) |
| 94 | this.doc.replaceRange( |
| 95 | lines.join('\n'), |
| 96 | { line: startRow, ch: 0 }, |
| 97 | { line: lastRow, ch: lastLine.length } |
| 98 | ) |
| 99 | } else { |
| 100 | this.doc.replaceRange( |
| 101 | lines.join('\n') + '\n', |
| 102 | { line: startRow, ch: 0 }, |
| 103 | { line: endRow, ch: 0 } |
| 104 | ) |
| 105 | } |
| 106 | } |
| 107 | |
| 108 | transact (func) { |
| 109 | this.transaction = true |
nothing calls this directly
no test coverage detected