-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
Steps to Reproduce:
- Create the editor via
createEditorfirst, without triggering thecmd + f - Create another diff editor in the same page via
createDiffEditorand destroy the diff editor - If you use the
cmd + fshortcut in the editor created bycreateEditor, the editor cannot display the search for weight and throws the following error
Failed to execute command: Error: InstantiationService has been disposed
at InstantiationService._throwIfDisposed (instantiationService.js:51:19)
at InstantiationService.createInstance (instantiationService.js:92:14)
at standaloneCodeEditor.js:77:89
at createInstantHoverDelegate (hoverDelegateFactory.js:30:12)
at new FindInput (findInput.js:63:72)
at new ContextScopedFindInput (contextScopedHistoryWidget.js:66:9)
at FindWidget._buildDomNode (findWidget.js:748:42)
at new FindWidget (findWidget.js:107:14)
at FindController._createFindWidget (findController.js:416:39)
at FindController._start (findController.js:374:18)
at FindController.start (findController.js:287:21)
at Array.<anonymous> (findController.js:458:23)
at MultiEditorAction.run (editorExtensions.js:285:35)
at MultiEditorAction.runEditorCommand (editorExtensions.js:255:21)
at codeEditorWidget.js:220:51
at InstantiationService.invokeFunction (instantiationService.js:84:20)
at InternalEditorAction._run (codeEditorWidget.js:219:51)
at InternalEditorAction.run (editorAction.js:22:21)
at MonacoActionRegistry.runAction (command.service.js:335:31)
at Object.execute (command.service.js:321:33)
at MonacoCommandRegistry.execute (command.service.js:150:50)
at Object.execute (command.service.js:139:40)
at CommandRegistryImpl.executeCommand (command.js:87:40) actions.find
Cause:
createEditor and createDiffEditor both use StandaloneCodeEditor, and there is setHoverDelegateFactory logic in constructor, where hoverDelegateFactory is a global singleton, which will be overwritten when the diff editor is created. So when I go back to the first editor and trigger the cmd + f shortcut, the hoverDelegateFactory on the singleton is from the diff editor, because the diff editor has been destroyed, so the InstantiationService is thrown here
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels