Skip to content

Commit

Permalink
Improve displaying inline frame decorator (#15097)
Browse files Browse the repository at this point in the history
* the logic to display the inline frame decorator should be independent of local state
* Now, the inline frame decorator is shown, when the column points behind the beginning of a line (excluding whitespace)

Signed-off-by: Florian Richter <[email protected]>
  • Loading branch information
mvtec-richter authored Mar 3, 2025
1 parent eaacdbf commit 3982113
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions packages/debug/src/browser/editor/debug-editor-model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ export class DebugEditorModel implements Disposable {
protected currentBreakpointDecorations: string[] = [];

protected editorDecorations: string[] = [];
protected topFrameRange: monaco.Range | undefined;

protected updatingDecorations = false;
protected toDisposeOnModelChange = new DisposableCollection();
Expand Down Expand Up @@ -223,14 +222,13 @@ export class DebugEditorModel implements Disposable {
options: DebugEditorModel.TOP_STACK_FRAME_DECORATION,
range: columnUntilEOLRange
});
const { topFrameRange } = this;
if (topFrameRange && topFrameRange.startLineNumber === currentFrame.raw.line && topFrameRange.startColumn !== currentFrame.raw.column) {
const firstNonWhitespaceColumn = this.editor.document.textEditorModel.getLineFirstNonWhitespaceColumn(currentFrame.raw.line);
if (currentFrame.raw.column > firstNonWhitespaceColumn) {
decorations.push({
options: DebugEditorModel.TOP_STACK_FRAME_INLINE_DECORATION,
range: columnUntilEOLRange
});
}
this.topFrameRange = columnUntilEOLRange;
} else {
decorations.push({
options: DebugEditorModel.FOCUSED_STACK_FRAME_MARGIN,
Expand Down

0 comments on commit 3982113

Please sign in to comment.