Posts Tagged ‘Apply Cut or Copy commands to blank lines when there is no selection’

In my earlier article, I had discussed about a new feature name introduced in SQL Server 2012, Cycle Clipboard Ring. This feature is very handy when it comes to bulk copy & paste.

In this article, we will discuss another issue with copy & paste and at times it can get irritable too, but SQL Server has provided the solution for this problem as well. Let me describe the problem/solution step by step.

Step 1 :
Copy any line of code from the query window.

Step 2 :
Go to any blank line and instead of paste (Ctl+V) just copy (Ctl+C) that line. This step usually happens by mistake.

Step 3 :
Now, try to paste (Ctl+V) on the same line. Ooopsss.. It pasted the blank lines, meaning whatever you copied, is lost.

Basically, you copied the blank line in the step 2 by mistake and as many times you pasted after that, it will paste the blank line.
Now what is the solution?

The solution is very simple. Just Select Tools >> Options >> Text Editor >> Plain text >> General >> and uncheck the Apply Cut or Copy commands to blank lines when there is no selection.

As shown in the pictures below.

copy blank lines1.2

copy blank lines1.1

Now, you can again proceed with the above three steps and it will not copy the blank line even if you do it by mistake.

Let me know if you face this problem in real world and its solution.

Read Full Post »