Author |
Topic |
|
BitBasher
New Member
3 Posts |
Posted - Oct 18 2004 : 6:25:36 PM
|
I am evaluating VA_X on the advise of a coworker. Looks good, but I've noticed a small problem with the Record (Ctrl-Shift-R) and Playback (Ctrl-Shift-P) builtin macros related to cursor handling.
Firstly, here's my install info... VA_X.dll file version 10.0.1246.0 Licensed to: VA X: VAOpsWin.dll version 1.0.0.44 MSDev.exe version 6.0.8168.1 Devshl.dll version 6.0.8798.0 Devedit.pkg version 6.0.8447.0 Font: Courier -13(Pixels) Comctl32.dll version 5.82.2800.1106 WindowsNT 5.1 Build 2600 Service Pack 1 Single processor
When moving the cursor up or down with the arrow keys, the default behavior of the IDE is to attempt to maintain the cursor column. That is, as the cursor moves from line-to-line, the cursor will stay the current column if the current line length is greater than or equal to the cursor's column. If the line length is less than the cursor's column, the IDE will place the cursor at the end of the line, BUT it will remember the desired cursor column, so on subsequent up/down movements the cursor will return to the correct column when the line length is long enough.
When VA_X is disabled, this behavior works both by just plain typing, or if the up/down cursor is placed in a record macro then played back.
When VA_X is enabled, the up/down "cursor column retention" works with the keyboard but FAILS when an up/down sequence is played back from a recorded macro. In the failed case, the cursor tends to "stick" to the last shortest line it found, and the cursor does NOT return to the remembered position.
This problem is during playback (not recording) because if I disable VA_X after recording a macro with up/down sequences, the playback will work.
The problem with this bug is that VA_X is changing the behavior of typed keyboard sequences on playback resulting in unexpected behavior.
BB.
|
|
feline
Whole Tomato Software
United Kingdom
19014 Posts |
Posted - Oct 18 2004 : 6:41:54 PM
|
interesting. firstly, thank you for the detailed post, it is nice to be able to just try and reproduce the bug without first working out what it is
i have just tried this in .NET 2003 using both VAX 1246 and the latest public beta 1276
i settled on a temporary macro that simply moves the caret down 4 times (pressing the down arrow 4 times), passing over lines of different lengths. for me, the macro plays back the same with VAX enabled or disabled.
i recorded the macro with VAX enabled, which seems to be the same as you.
do you have any other plugin's installed? if not, is your macro this simple, or does it contain any other actions that might be effected by VAX?
i often use temporary macros with VAX enabled without any problems, so long as i am careful to avoid interacting with suggestion listboxes. |
zen is the art of being at one with the two'ness |
|
|
BitBasher
New Member
3 Posts |
Posted - Oct 18 2004 : 7:34:07 PM
|
I have no other IDE plugins loaded.
The macro can consist of just a single key press of say the down arrow key one time. It doesn't have to be complex. When played back (Ctrl-Shift-P) with VA_X enabled, the cursor does NOT retain the "remembered" column. I can now reproduce this on 4 different systems, with ONE notable exception...
One system uses Brief keyboard emulation (which doesn't have the remember-the-cursor-column logic) so moving down always moves down in a straight line, and VA_X doesn't mess up this behavior.
I suspect an IDE option setting might have something to do with this. Perhaps an interaction with Smart indenting (which I have off), or any one of the compatibility settings (I have enabled Copy Without Select, Use BRIEF regular expression, and Doubleclick in dialog editor edits code). I'll try playing with the stock IDE settings to see if I can effect the VA_X behavior.
Do remember that I am using MSVC++ IDE v6.0 (not .net) with SP5 or SP6 (can't remember which one). Your test was with .NET 2003 which might be different enough to not exhibit this problem.
Thanks, BB.
|
Edited by - BitBasher on Oct 18 2004 7:34:56 PM |
|
|
WannabeeDeveloper
Tomato Guru
Germany
775 Posts |
Posted - Oct 19 2004 : 2:39:04 PM
|
Somewhere, I have VS 6.0 here buried... meaning I could test it with your macro.
Could you mail your macro to [email protected] so I can test it under the same conditions? Just a small Info on where to copy the file and how to start the makro would be cool, too (I never really used VS 6.0 (especially no makros)).
|
|
|
|
BitBasher
New Member
3 Posts |
Posted - Oct 19 2004 : 6:19:25 PM
|
----- THIS REPLY WAS ALSO EMAILED TO STEFAN -----
The record/playback are not really macros that are saved. But, they are really easy to reproduce.
To reproduce this problem in MSVC++ 6.0 IDE, do this:
1. Open up any C or C++ source file.
2. Ensure that the "Enable Virtual Space" compatibility option is DISABLED (unchecked). This is an IDE setting.
3. Position the cursor on any line.
4. Press Ctrl-Shift-R to start recording a macro.
5. Press the DOWN ARROW key once to move the cursor down one line.
6. Press Ctrl-Shift-R to end the recording of the macro (which has the single keystroke in it).
7. Now, position the cursor on a column of a line so that there are lines below that are of less length than the cursor's line. For this example, say the cursor is moved over to column 25.
8. Ensure that VA_X is enabled.
9. Now, first repeatedly press the DOWN ARROW key and watch the behavior of the cursor. You'll notice that as it passes shorter lines, it will move to the end of the shorter line. As the cursor passes back through longer lines, it will "remember" column 25 and go back to it. In other words, the cursor always attempts to stay at column 25 if it can. This is the correct behavior when the "Enable Virtual Space" option is disabled.
10. Now, move the cursor back to where it was in step 7 (column 25 in this example).
11. Now instead of moving the cursor down with DOWN ARROW, run the playback macro by typing Ctrl-Shift-P repeatedly. Remember, the playback macro contains just the single DOWN ARROW keystroke. Now, when VA_X is enabled, you'll noticed the cursor does NOT return to column 25 as it passes through shorter then longer lines - the cursor tends to "glue" to the shortest line and stay there. This is the bug.
12. Now, move the cursor back to where it was in step 7 (column 25 in this example), and DISABLE VA_X.
13. Repeat step 11, but this time as you are pressing Ctrl-Shift-P to move the cursor down, it should return to column 25 because now VA-X is disabled and is not messing up the cursor/playback logic.
If you still can't reproduce this problem, let me know as I can reproduce it on several systems, so it's not an isolated problem.
BB.
|
|
|
Cezariusz
Tomato Guru
Poland
244 Posts |
Posted - Oct 20 2004 : 02:35:24 AM
|
I think I've seen this behaviour even when using arrows from the keyboard, not macro. Looks like VA X really sometimes changes "cursor logic", but it's not 100% reproducible (at least without using macro). |
Cezariusz Marek https://midicat.net/ |
|
|
feline
Whole Tomato Software
United Kingdom
19014 Posts |
Posted - Oct 26 2004 : 7:30:26 PM
|
case=402
i cannot make this go wrong in .NET 2003, but i can make it go wrong in VC6. speaking as someone who uses macro's a LOT in VIM under UNIX and a fair bit in .NET 2003 i never rely on these sort of subtle cursor movements when putting together a keyboard macro.
i have found it always best to use a combination of home and end to make sure you are where you want to be on the line at the start of each operation. this way you can re-use the macro more easily and more often.
the work around for now is either disable VAX when playing back macro's, or try to work around this problem when recording them. personally i recommend working around it. |
zen is the art of being at one with the two'ness |
|
|
|
Topic |
|
|
|