Author |
Topic |
|
Old as dirt
Tomato Guru
USA
246 Posts |
Posted - Mar 27 2004 : 7:26:08 PM
|
I have Format after paste checked and I believe it used to work when I dragged a chunk of code into a place where it should be indented but now it doesn't. If instead I highlight it (the chunk of code) and press Ctrl X to cut it and place it on the clipboard and then use Ctrl V then it is formatted as desired. Is this the expected behavior now? I think it is broken.
VA_X.dll file version 10.0.1221.0 Licensed to: VA 6.0: VAOpsWin.dll version 1.0.0.44 MSDev.exe version 6.0.8168.2 Devshl.dll version 6.0.8168.0 Devedit.pkg version 6.0.8168.0 Font: Courier New 12(Pixels) Comctl32.dll version 5.81.4916.400 WindowsNT 5.0 Build 2195 Service Pack 4 Single processor
Platform: Win32 (x86) Stable Includes: C:\\Program Files\\Microsoft Visual Studio\\VC98\\INCLUDE; C:\\Program Files\\Microsoft Visual Studio\\VC98\\MFC\\INCLUDE; C:\\Program Files\\Microsoft Visual Studio\\VC98\\ATL\\INCLUDE; C:\\PROGRAM FILES\\MATROX IMAGING\\MIL\\INCLUDE;
Library Includes: C:\\Program Files\\Microsoft Visual Studio\\VC98\\MFC\\SRC; C:\\Program Files\\Microsoft Visual Studio\\VC98\\MFC\\INCLUDE; C:\\Program Files\\Microsoft Visual Studio\\VC98\\ATL\\INCLUDE; C:\\Program Files\\Microsoft Visual Studio\\VC98\\CRT\\SRC;
Other Includes:
|
Ken |
|
Old as dirt
Tomato Guru
USA
246 Posts |
Posted - Mar 29 2004 : 2:49:30 PM
|
It seems to be working today. I can't seem to break it even while trying. |
Ken |
|
|
Old as dirt
Tomato Guru
USA
246 Posts |
Posted - Apr 15 2004 : 5:04:31 PM
|
I am running VAX 1229 with VC6 and this problem appears again (sometimes) I can't find a pattern. Right now it is failing with 3 lines highlighted. If I press alt-f8 to force the auto-format then it is indented or un-indented as needed. Is this a problem on your list? |
Ken |
|
|
support
Whole Tomato Software
5566 Posts |
Posted - Apr 15 2004 : 10:10:38 PM
|
If you are dropping multiple lines, it "should" reformat. Does it always fail with the same three lines? Is it specific to the three lines? or the file or place you are dragging or dropping?
|
Whole Tomato Software, Inc. |
|
|
Old as dirt
Tomato Guru
USA
246 Posts |
Posted - Apr 16 2004 : 10:42:53 AM
|
It seems to fail when there is a comment after one or more of the lines. I have tried removing the comment on a group that failed and it started working. I also tried putting a comment on a group that worked and it failed. So, I guess there is a pattern after all. |
Ken |
|
|
support
Whole Tomato Software
5566 Posts |
Posted - Apr 16 2004 : 12:29:33 PM
|
That's it. VA does not reformat if the selection contains comments because reformat indents commented lines. // int i; becomes: // int i;
I guess VA could look to see if the selection contains lines that begin with comments, and not just lines containing comments. |
Whole Tomato Software, Inc. |
|
|
Old as dirt
Tomato Guru
USA
246 Posts |
Posted - Apr 16 2004 : 2:24:59 PM
|
Please do that because an awful lot of my code has comments at the end of the line. I can't imagine that other people haven't had problems with this earlier. |
Ken |
|
|
LarryLeonard
Tomato Guru
USA
1041 Posts |
Posted - Apr 16 2004 : 2:32:35 PM
|
I think the reason more people haven't noticed this is that most people, I think it's safe to say, don't put comments at the ends of lines. Personally, I find it cluttering; also, although I'm sure you don't do this, the comments like this that I come across always seem be worthless, along the lines of: ++nFramitz; // Increment the framitz count. But to each his own...
|
|
|
Uniwares
Tomato Guru
Portugal
2322 Posts |
Posted - Apr 16 2004 : 2:49:47 PM
|
I have lots of end-of-line comments (i.e. documenting the use of variables at the declaration), but why the hell would I ever use drag-n-drop ???? That means taking one hand off the keyboard. How unpractic. |
|
|
Old as dirt
Tomato Guru
USA
246 Posts |
Posted - Apr 16 2004 : 3:28:48 PM
|
Yes, to each his own. I rarely use the keyboard for anything more than typing and do nearly all of my navigation with the mouse. I bet a quarter of my code is copied from someplace else in my code. How do you (easily) mark a bunch of code that goes over several screens without using the mouse? As far as the comments, mine are slightly more useful than the example, at least to me |
Ken |
|
|
Old as dirt
Tomato Guru
USA
246 Posts |
Posted - Apr 28 2004 : 10:57:00 AM
|
quote: Originally posted by support
That's it. VA does not reformat if the selection contains comments because reformat indents commented lines. // int i; becomes: // int i;
I guess VA could look to see if the selection contains lines that begin with comments, and not just lines containing comments.
When you implement this, how about only excluding lines that have the comment starting in column 0 because I would want block comments that are already indented to be indented along with the rest of the code.
Also, and I realize this is harder, how about still indenting the code that doesn't start with a comment in column 0 even if some of the selected code has comments starting at the first column. |
Ken |
|
|
feline
Whole Tomato Software
United Kingdom
19020 Posts |
Posted - Apr 28 2004 : 11:39:16 AM
|
if that could be done it would be very useful
when "surround selection on /" comments code it puts the first / in the first column. if this comment then gets indented you cannot simply uncomment it by selecting it and pressing / again *sigh* |
zen is the art of being at one with the two'ness |
|
|
|
Topic |
|