From 3ab605c4dea5f3fbd2155ddb54729c9f45b31ccf Mon Sep 17 00:00:00 2001 From: Rob Lourens Date: Mon, 24 Aug 2020 17:15:03 -0700 Subject: [PATCH] Fix notebook argument processor for cells --- src/vs/workbench/api/common/extHostNotebook.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/api/common/extHostNotebook.ts b/src/vs/workbench/api/common/extHostNotebook.ts index d7b304c7eee..b24e33fde16 100644 --- a/src/vs/workbench/api/common/extHostNotebook.ts +++ b/src/vs/workbench/api/common/extHostNotebook.ts @@ -930,7 +930,8 @@ export class ExtHostNotebookController implements ExtHostNotebookShape, ExtHostN this._proxy = mainContext.getProxy(MainContext.MainThreadNotebook); commands.registerArgumentProcessor({ - processArgument: arg => { + // Serialized INotebookCellActionContext + processArgument: (arg) => { if (arg && arg.$mid === 12) { const documentHandle = arg.notebookEditor?.notebookHandle; const cellHandle = arg.cell.handle; @@ -939,7 +940,7 @@ export class ExtHostNotebookController implements ExtHostNotebookShape, ExtHostN if (value[1].editor.notebookData.handle === documentHandle) { const cell = value[1].editor.notebookData.getCell(cellHandle); if (cell) { - return cell; + return cell.cell; } } }