MCPcopy Create free account
hub / github.com/anomalyco/opencode / _rowEnd

Method _rowEnd

packages/app/src/addons/serialize.ts:274–296  ·  view source on GitHub ↗
(row: number, isLastRow: boolean)

Source from the content-addressed store, hash-verified

272 }
273
274 protected _rowEnd(row: number, isLastRow: boolean): void {
275 let rowSeparator = ""
276
277 const nextLine = isLastRow ? undefined : this._buffer.getLine(row + 1)
278 const wrapped = !!nextLine?.isWrapped
279
280 if (this._nullCellCount > 0 && wrapped) {
281 this._currentRow += " ".repeat(this._nullCellCount)
282 }
283
284 this._nullCellCount = 0
285
286 if (!isLastRow && !wrapped) {
287 rowSeparator = "\r\n"
288 this._lastCursorRow = row + 1
289 this._lastCursorCol = 0
290 }
291
292 this._allRows[this._rowIndex] = this._currentRow
293 this._allRowSeparators[this._rowIndex++] = rowSeparator
294 this._currentRow = ""
295 this._nullCellCount = 0
296 }
297
298 private _diffStyle(cell: IBufferCell, oldCell: IBufferCell): number[] {
299 const sgrSeq: number[] = []

Callers 1

serializeFunction · 0.80

Calls 1

getLineMethod · 0.80

Tested by

no test coverage detected