Inheritance margin gets between line numbers and current line pill margins
- Dominant language
- C#
- Stars
- 20.7k
- Forks
- 4.3k
- PR merge metrics
- PR metrics pending
Description
**Version Used**:
main
**Steps to Reproduce**:

**Expected Behavior**:
Inheritance margin is the leftmost margin within the container.
**Actual Behavior**:
Gets between two built-in margins.
A comment in InheritanceMarginViewMarginProviderindicates the margin is supposed to be left-most:
// Place our margin inside Left Selection Margin Container. And keep it to the left-most location.
[MarginContainer(PredefinedMarginNames.LeftSelection)]
[Order(After = DefaultOrderings.Lowest)]
But this clearly doesn't work. The issue is that DefaultOrderings.Lowest is supposed to be used with Before argument, not After:
"Orderable items that do not explicitly indicate they are before Lowest have an implicit constraint that they are after Lowest."
https://learn.microsoft.com/en-us/dotnet/api/microsoft.visualstudio.utilities.defaultorderings?view=visualstudiosdk-2022
Switch to [Order(Before = DefaultOrderings.Lowest)] instead.
Contributor guide
Research direction
Open InheritanceMarginViewMarginProvider and inspect its margin ordering attributes, using the linked DefaultOrderings documentation to confirm the constraint semantics. Change the ordering so the inheritance margin is leftmost, then verify the margin no longer appears between the line-number and current-line-pill margins.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100