提交 b919e2f1 编写于 作者: I isidor

fixes #42485

上级 53d1ca58
...@@ -263,17 +263,23 @@ export class DebugEditorModelManager implements IWorkbenchContribution { ...@@ -263,17 +263,23 @@ export class DebugEditorModelManager implements IWorkbenchContribution {
} }
private createBreakpointDecorations(model: ITextModel, breakpoints: IBreakpoint[]): { range: Range; options: IModelDecorationOptions; }[] { private createBreakpointDecorations(model: ITextModel, breakpoints: IBreakpoint[]): { range: Range; options: IModelDecorationOptions; }[] {
return breakpoints.map((breakpoint) => { const result: { range: Range; options: IModelDecorationOptions; }[] = [];
const column = model.getLineFirstNonWhitespaceColumn(breakpoint.lineNumber); breakpoints.forEach((breakpoint) => {
const range = model.validateRange( if (breakpoint.lineNumber <= model.getLineCount()) {
breakpoint.column ? new Range(breakpoint.lineNumber, breakpoint.column, breakpoint.lineNumber, breakpoint.column + 1) const column = model.getLineFirstNonWhitespaceColumn(breakpoint.lineNumber);
: new Range(breakpoint.lineNumber, column, breakpoint.lineNumber, column + 1) // Decoration has to have a width #20688 const range = model.validateRange(
); breakpoint.column ? new Range(breakpoint.lineNumber, breakpoint.column, breakpoint.lineNumber, breakpoint.column + 1)
return { : new Range(breakpoint.lineNumber, column, breakpoint.lineNumber, column + 1) // Decoration has to have a width #20688
options: this.getBreakpointDecorationOptions(breakpoint), );
range
}; result.push({
options: this.getBreakpointDecorationOptions(breakpoint),
range
});
}
}); });
return result;
} }
private getBreakpointDecorationOptions(breakpoint: IBreakpoint): IModelDecorationOptions { private getBreakpointDecorationOptions(breakpoint: IBreakpoint): IModelDecorationOptions {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册