fix breakpoints view middle click

上级 94463680
......@@ -110,25 +110,28 @@ export class BreakpointsView extends ViewPane {
this._register(this.list.onContextMenu(this.onListContextMenu, this));
this.list.onMouseMiddleClick(async ({ element }) => {
if (element instanceof Breakpoint) {
await this.debugService.removeBreakpoints(element.getId());
} else if (element instanceof FunctionBreakpoint) {
await this.debugService.removeFunctionBreakpoints(element.getId());
} else if (element instanceof DataBreakpoint) {
await this.debugService.removeDataBreakpoints(element.getId());
}
});
const resourceNavigator = this._register(new ListResourceNavigator(this.list, { configurationService: this.configurationService }));
this._register(resourceNavigator.onDidOpen(async e => {
if (!e.element) {
if (e.element === null) {
return;
}
const element = this.list.element(e.element);
if (e.browserEvent instanceof MouseEvent && e.browserEvent.button === 1) { // middle click
if (element instanceof Breakpoint) {
await this.debugService.removeBreakpoints(element.getId());
} else if (element instanceof FunctionBreakpoint) {
await this.debugService.removeFunctionBreakpoints(element.getId());
} else if (element instanceof DataBreakpoint) {
await this.debugService.removeDataBreakpoints(element.getId());
}
return;
}
const element = this.list.element(e.element);
if (element instanceof Breakpoint) {
openBreakpointSource(element, e.sideBySide, e.editorOptions.preserveFocus || false, this.debugService, this.editorService);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册