mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-26 03:29:00 +01:00
Add an untitled document data property (#115790)
* Add an untitled document data property * Dispose of the model passed back * Fix layer problem * Add untitledDocumentData to untitled notebooks * Fix compilation errors * Switch to using VS Buffer * Fix threading the untitled document data back through * Prevent save dialog on untitled reopen with * Change ignore save setting * Change setting name and abide by preserve focus * Add unit test * Switch to js doc comments * Consolidate calculating the untitled value, and added test
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { VSBuffer } from 'vs/base/common/buffer';
|
||||
import { CancellationToken } from 'vs/base/common/cancellation';
|
||||
import { diffMaps, diffSets } from 'vs/base/common/collections';
|
||||
import { Emitter } from 'vs/base/common/event';
|
||||
@@ -402,8 +403,8 @@ export class MainThreadNotebooks implements MainThreadNotebookShape {
|
||||
contentOptions.transientOutputs = newOptions.transientOutputs;
|
||||
},
|
||||
viewOptions: options.viewOptions,
|
||||
openNotebook: async (viewType: string, uri: URI, backupId: string | undefined, token: CancellationToken) => {
|
||||
const data = await this._proxy.$openNotebook(viewType, uri, backupId, token);
|
||||
openNotebook: async (viewType: string, uri: URI, backupId: string | undefined, token: CancellationToken, untitledDocumentData?: VSBuffer) => {
|
||||
const data = await this._proxy.$openNotebook(viewType, uri, backupId, token, untitledDocumentData);
|
||||
return {
|
||||
data,
|
||||
transientOptions: contentOptions
|
||||
|
||||
Reference in New Issue
Block a user