(row)
| 60 | } |
| 61 | |
| 62 | deleteLine (row) { |
| 63 | const lastRow = this.getLastRow() |
| 64 | if (row >= lastRow) { |
| 65 | if (lastRow > 0) { |
| 66 | const preLastLine = this.getLine(lastRow - 1) |
| 67 | const lastLine = this.getLine(lastRow) |
| 68 | this.doc.replaceRange( |
| 69 | '', |
| 70 | { line: lastRow - 1, ch: preLastLine.length }, |
| 71 | { line: lastRow, ch: lastLine.length } |
| 72 | ) |
| 73 | } else { |
| 74 | const lastLine = this.getLine(lastRow) |
| 75 | this.doc.replaceRange( |
| 76 | '', |
| 77 | { line: lastRow, ch: 0 }, |
| 78 | { line: lastRow, ch: lastLine.length } |
| 79 | ) |
| 80 | } |
| 81 | } else { |
| 82 | this.doc.replaceRange( |
| 83 | '', |
| 84 | { line: row, ch: 0 }, |
| 85 | { line: row + 1, ch: 0 } |
| 86 | ) |
| 87 | } |
| 88 | } |
| 89 | |
| 90 | replaceLines (startRow, endRow, lines) { |
| 91 | const lastRow = this.getLastRow() |
nothing calls this directly
no test coverage detected