Persist cell data when delete cell content.

This commit is contained in:
rebornix
2020-03-17 14:40:43 -07:00
parent d9b9cfece0
commit 8e72cca30c
2 changed files with 26 additions and 23 deletions

View File

@@ -37,13 +37,21 @@ export class MainThreadCell implements ICell {
this._onDidChangeDirtyState.fire(newState);
}
get source() {
return this._source;
}
set source(newValue: string[]) {
this._source = newValue;
this._buffer = null;
}
private _buffer: PieceTreeTextBufferFactory | null = null;
constructor(
readonly uri: URI,
public handle: number,
public source: string[],
private _source: string[],
public language: string,
public cellKind: CellKind,
outputs: IOutput[]