dotnet/roslyn

VB auto-format should add original text to undo stack when auto-formatting copy-pasted text

Open

#51,042 opened on Feb 6, 2021

View on GitHub
 (0 comments) (0 reactions) (0 assignees)C# (4,257 forks)batch import
Area-IDEBugLanguage-VBhelp wanted

Repository metrics

Stars
 (20,414 stars)
PR merge metrics
 (Avg merge 6d 17h) (256 merged PRs in 30d)

Description

Version Used:

Steps to Reproduce:

  1. Copy the following multi-line text:
partial method that does not have implementation part is not emitted to metadata.
partial method that does not have implementation part is not emitted to metadata.
  1. Paste it to VB source file.
Module Program
    Sub Main(args As String())
      $$ 
    End Sub
End Module
  1. Ctrl+Z

Expected Behavior:

After copying (the first line is auto-formatted):

Module Program
    Sub Main(args As String())
      Partial method that does Not have implementation part Is Not emitted To metadata.
Partial method that does Not have implementation part Is Not emitted To metadata.
    End Sub
End Module

Ctrl+Z undoes the formatting,

Module Program
    Sub Main(args As String())
      partial method that does not have implementation part is not emitted to metadata.
partial method that does not have implementation part is not emitted to metadata.
    End Sub
End Module

Actual Behavior:

Cltr+Z removes the pasted text.

Contributor guide