Breakpoints which appear in margin and injected text aren't factored into glyph margin width #180619
Labels
bug
Issue identified by VS Code Team member as probable bug
insiders-released
Patch has been released in VS Code Insiders
verified
Verification succeeded
Milestone
Debugging this in devtools, this appears to be because the breakpoint does not appear in the result of
getAllMarginDecorations
. Therefore it's not taken into account when calculating the size of the margin.vscode/src/vs/editor/common/viewModel/viewModelImpl.ts
Line 465 in ab7c32a
When we actually go to render the decorations, we use a different source of information
ctx.getDecorationsInViewport
, where the breakpoint does show up, so we end up rendering it even though no lane space was allocated for it.vscode/src/vs/editor/browser/viewParts/glyphMargin/glyphMargin.ts
Line 188 in ab7c32a
Those inline breakpoints appear by using injected text:
vscode/src/vs/workbench/contrib/debug/browser/breakpointEditorContribution.ts
Lines 141 to 145 in ab7c32a
I think the problem is that the fast path for getting just margin decorations doesn't search the injected text interval tree for margin decorations (because I didn't realize that margin decorations could appear in the injected text interval tree when implementing #179974).
vscode/src/vs/editor/common/model/textModel.ts
Lines 2063 to 2076 in ab7c32a
Only caught this now because inline breakpoints only show up when there are active debug sessions, and I didn't have a case where I set a breakpoint on a line with another decoration in a debug session till today :/
The text was updated successfully, but these errors were encountered: