mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-22 01:29:04 +01:00
cleanup notebook argument processor, remove INotebookTextModel#handle and use uri instead, https://github.com/microsoft/vscode/issues/105735
This commit is contained in:
@@ -962,16 +962,13 @@ export class ExtHostNotebookController implements ExtHostNotebookShape, ExtHostN
|
||||
// Serialized INotebookCellActionContext
|
||||
processArgument: (arg) => {
|
||||
if (arg && arg.$mid === 12) {
|
||||
const documentHandle = arg.notebookEditor?.notebookHandle;
|
||||
const notebookUri = arg.notebookEditor?.notebookUri;
|
||||
const cellHandle = arg.cell.handle;
|
||||
|
||||
for (const value of this._editors) {
|
||||
if (value[1].editor.notebookData.handle === documentHandle) {
|
||||
const cell = value[1].editor.notebookData.getCell(cellHandle);
|
||||
if (cell) {
|
||||
return cell.cell;
|
||||
}
|
||||
}
|
||||
const data = this._documents.get(notebookUri);
|
||||
const cell = data?.getCell(cellHandle);
|
||||
if (cell) {
|
||||
return cell.cell;
|
||||
}
|
||||
}
|
||||
return arg;
|
||||
|
||||
Reference in New Issue
Block a user