From 3982113ce03481d20da574db6cc29f4681213a06 Mon Sep 17 00:00:00 2001 From: Florian Richter <77792630+mvtec-richter@users.noreply.github.com> Date: Mon, 3 Mar 2025 13:47:53 +0100 Subject: [PATCH] Improve displaying inline frame decorator (#15097) * 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 --- packages/debug/src/browser/editor/debug-editor-model.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/debug/src/browser/editor/debug-editor-model.ts b/packages/debug/src/browser/editor/debug-editor-model.ts index c0533d9145383..f02848356836c 100644 --- a/packages/debug/src/browser/editor/debug-editor-model.ts +++ b/packages/debug/src/browser/editor/debug-editor-model.ts @@ -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(); @@ -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,