razor icon indicating copy to clipboard operation
razor copied to clipboard

Incorrect cursor indentation in .razor file when typing newline after child element of a component

Open vsfeedback opened this issue 2 years ago • 1 comments

This issue has been moved from a ticket on Developer Community.


Repro steps:

  • Create a Blazor Server project
  • Add a package reference to Microsoft.AspNetCore.Components.QuickGrid
  • Add a QuickGrid component with a PropertyColumn to index.razor using a self-closing tag
  • Type a newline at the end of the PropertyColumn

Expect result: Cursor is indented at the same level as the PropertyColumn

Actual result: The cursor is indented one level deeper than the PropertyColumn

devenv_5KMQVtTRRG.gif


Original Comments

Feedback Bot on 8/7/2022, 07:11 PM:

(private comment, text removed)


Original Solutions

(no solutions)

vsfeedback avatar Aug 11 '22 21:08 vsfeedback

Good catch @Daniel Roth , the "=>" in the property value is the important bit here, it likely breaks TextMate.

ryanbrandenburg avatar Aug 11 '22 21:08 ryanbrandenburg

This was fixed by https://github.com/dotnet/razor/pull/8996

davidwengier avatar Aug 27 '23 11:08 davidwengier