Search

VS2010 Beta 2: "Cut" on a blank line works differently to VS2008 by bakery2k

Closed
as By Design Help for as By Design

2
Sign in to vote
0
Sign in to vote
Sign in
to vote
Type: Bug
ID: 507334
Opened: 11/1/2009 2:52:08 PM
Access Restriction: Public
0
Workaround(s)
0
User(s) can reproduce this bug
I have the option "Apply Cut or Copy commands to blank lines when there is no selection" deselected in Tools => Options => Text Editor => All Languages => General. In previous versions of Visual Studio, applying a "cut" to an empty line would remove the line, but not overwrite the contents of the clipboard. With VS2010 Beta 2, nothing happens.

Note that at https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=111320 Meghan Perez from Visual Studio Core clarifies the behavior in previous versions of Visual Studio: "This option only refers to putting text on the clipboard, not actually the cut action. [...] In the case of cut, the delete happens but nothing is put on the clipboard. We will look closer at the wording for this option."

It seems that in VS2010, rather than clarify the wording of the option, the behavior has changed to match the current wording.
Details (expand)

Product Language

English

Version

Visual Studio 2010 Beta 2

Operating System

Windows Vista

Operating System Language

English

Steps to Reproduce

- Ensure Tools => Options => Text Editor => All Languages => General => "Apply Cut or Copy commands to blank lines when there is no selection" is deselected.
- File => New => File => Visual C++ => C++ File (.cpp)
- Add several blank lines
- Hit Ctrl-X on a blank line

Actual Results

Nothing happens.

Expected Results

The line should be removed, but without overwriting the contents of the clipboard.
      You can indicate your satisfaction with how Microsoft handled this issue by completing this quick 3 question survey. [Details]

 

File Attachments
0 attachments
Sign in to post a comment.
Posted by Microsoft on 11/2/2009 at 12:51 AM
Thank you for your feedback, We are currently reviewing the issue you have submitted.
Posted by Microsoft on 11/4/2009 at 7:09 PM
Thanks for your feedback. We are routing this bug to the product unit who works on that specific feature area. The team will review this issue and make a decision on whether they will fix it or not for the next release.

Thank you,
Visual Studio Product Team
Posted by Microsoft on 11/10/2009 at 1:47 PM
Hi bakery2k,

Thank you for reporting this issue. You're right that this is a slight behavior change from VS 2008 and that we updated the behavior to better match the wording of this option. Because this was an intentional change, I'm resolving it as By Design.

That said, it's still possible to get your desired behavior in VS 2010 with slightly different commands. Edit.LineDelete (Ctrl+Shift+L) will delete the current line without affecting the clipboard, regardless of whether the line is blank and regardless of whether the "Apply Cut or Copy..." option is checked. Edit.LineCut (Ctrl+L) might also be of interest - it will cut the current line, again regardless of whether the line is blank and whether the option is checked.

Given that there are other ways to accomplish cutting and deleting lines, we felt that bringing the behavior of Ctrl+X in line with the wording of this option made sense and did not block any scenarios. If you have further feedback on this decision, please feel free to post again here at any time and we'll be happy to respond.

Thanks for trying Visual Studio 2010 Beta2 and sending your feedback!

Brittany Behrens
Program Manager, VS Platform
http://blogs.msdn.com/visualstudio
Posted by bakery2k on 11/10/2009 at 9:22 PM
Thank you, Brittany, for the very complete explanation. I guess I'll start using Ctrl[+Shift]+L instead!
Posted by Microsoft on 11/12/2009 at 11:33 PM
No problem - happy to help :-)

- Brittany