dotnet/roslyn

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

Aperta

#51.042 aperta il 6 feb 2021

 (0 commenti) (0 reazioni) (0 assegnatari)C# (4257 fork)batch import
Area-IDEBugLanguage-VBhelp wanted

Metriche repository

Star
 (20.414 stelle)
Metriche merge PR
 (Merge medio 6g 17h) (256 PR mergiate in 30 g)

Descrizione

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.

Guida contributor