visual studio .net ide:
I’m using Visual Studio 2005 with SP1.
Version 8.0.50727.762 (SP.050727-7600)
I am confused by a behavior I believe might be a bug.
Anyone from the Microsoft Visual Team could comment please.
Here is the reproducing step.
1-Open a .cpp file for text edition in a C++ project.
2-Make sure the environment is set in virtual space for the text editor.
3-Have some code written (any) with a block of interspaced virtual space
with no text.
For example:
(...)
#define MAKEWORD(a, b) ((WORD)(((BYTE)((DWORD_PTR)(a) & 0xff)) |
((WORD)((BYTE)((DWORD_PTR)(b) & 0xff))) << 8))
#define MAKELONG(a, b) ((LONG)(((WORD)((DWORD_PTR)(a) & 0xffff)) |
((DWORD)((WORD)((DWORD_PTR)(b) & 0xffff))) << 16))
#define LOWORD(l) ((WORD)((DWORD_PTR)(l) & 0xffff))
#define HIWORD(l) ((WORD)((DWORD_PTR)(l) >> 16))
#define LOBYTE(w) ((BYTE)((DWORD_PTR)(w) & 0xff))
#define HIBYTE(w) ((BYTE)((DWORD_PTR)(w) >> 8))
(Few lines of Virtual interspaced space
here)
typedef WORD ATOM;
typedef HANDLE NEAR *SPHANDLE;
typedef HANDLE FAR *LPHANDLE;
typedef HANDLE HGLOBAL;
typedef HANDLE HLOCAL;
typedef HANDLE GLOBALHANDLE;
typedef HANDLE LOCALHANDLE;
(...)
4- Now select in block selection mode with the mouse a column block of code
anywhere in the text.
and copy the selected text. Make sure the column block select only 1 line of
code.
5- Set the insert point somewhere in the interspaced space. But not at the
beginning of a line
6. Paste the copied test from the clipboard.
7.- The pasted test is inserted at the anchor point where the insert point
was set.
8- That’s OK. And expected.
9- Redo step 1 to 3
10- Now select in block selection mode with the mouse a column block of code
anywhere in the text.
and copy the selected text. Make sure the column block select more than 1
line of code.
11- Set the insert point somewhere in the interspaced space. But not at the
beginning of a line
12- Paste the copied test from the clipboard.
13- The pasted text will be moved to the beginning of the line of the insert
point.
14- This is not and expected behavior. The moved block should be pasted at
the insert point.
Is this behavior has been reported as a bug previously?
Thanks