diff --git a/src/vs/workbench/parts/debug/browser/breakpointWidget.ts b/src/vs/workbench/parts/debug/browser/breakpointWidget.ts index 624a81da08eee24f8ce8d2fd43f0dd92afc44763..cf0518bb789fec3a98a3af5555fdf6ad872cc236 100644 --- a/src/vs/workbench/parts/debug/browser/breakpointWidget.ts +++ b/src/vs/workbench/parts/debug/browser/breakpointWidget.ts @@ -13,6 +13,7 @@ import lifecycle = require('vs/base/common/lifecycle'); import dom = require('vs/base/browser/dom'); import { InputBox } from 'vs/base/browser/ui/inputbox/inputBox'; import { CommonEditorRegistry } from 'vs/editor/common/editorCommonExtensions'; +import editorcommon = require('vs/editor/common/editorCommon'); import editorbrowser = require('vs/editor/browser/editorBrowser'); import { ZoneWidget } from 'vs/editor/contrib/zoneWidget/browser/zoneWidget'; import { IContextViewService } from 'vs/platform/contextview/browser/contextView'; @@ -43,6 +44,7 @@ export class BreakpointWidget extends ZoneWidget { this.breakpointWidgetVisible = keybindingService.createKey(CONTEXT_BREAKPOINT_WIDGET_VISIBLE, false); this.breakpointWidgetVisible.set(true); BreakpointWidget.INSTANCE = this; + this.toDispose.push(editor.addListener2(editorcommon.EventType.ModelChanged, () => this.dispose())); } public fillContainer(container: HTMLElement): void { diff --git a/src/vs/workbench/parts/debug/browser/debugEditorModelManager.ts b/src/vs/workbench/parts/debug/browser/debugEditorModelManager.ts index 8d637ea1dc4103fcbe16a0f30d4e425f4e7e32bb..4d200161c8c622a2976fb9b74b6254116775f81b 100644 --- a/src/vs/workbench/parts/debug/browser/debugEditorModelManager.ts +++ b/src/vs/workbench/parts/debug/browser/debugEditorModelManager.ts @@ -7,7 +7,6 @@ import lifecycle = require('vs/base/common/lifecycle'); import editorcommon = require('vs/editor/common/editorCommon'); import { IWorkbenchContribution } from 'vs/workbench/common/contributions'; import { IDebugService, ModelEvents, ViewModelEvents, IBreakpoint, IRawBreakpoint, State } from 'vs/workbench/parts/debug/common/debug'; -import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; import { IModelService } from 'vs/editor/common/services/modelService'; function toMap(arr: string[]): { [key: string]: boolean; } { @@ -48,7 +47,6 @@ export class DebugEditorModelManager implements IWorkbenchContribution { constructor( @IModelService private modelService: IModelService, - @IWorkbenchEditorService private editorService: IWorkbenchEditorService, @IDebugService private debugService: IDebugService ) { this.modelData = {};