I'm not a huge macro user, but I sporadically record "one-time" macros to clean up a set of data to be saved off. I've noticed some problems with SlickEdit 11 (currently using 11.0.2) and am wondering if this is a bug or a purposeful modification to how macros work. First off, here's the "dirty text".
vector_error_17( void )
6 0 11 0.545 ------
vector_error_1a( void )
6 0 11 0.545 ------
vector_error_1d( void )
6 0 11 0.545 ------
white_space( U_8 )
To set up my macro, I first perform a "CTRL+F" and search for '('. That places the cursor on (and highlights) the open-paren after vector_error_17. Then, I type:
CTRL+F11 (turns Macro Recording On)
SHIFT+END (highlight to end of line)
DELETE (Delete everything after the end of the open-paren)
CTRL+G (go to next open-paren)
CTRL+F12 (turns Macro Recording Off)
I saved this macro as "no_works" because when I run it, it successfully finds each "next" open-paren, but it does not delete the stuff from the current open-paren to the end of the line (like it did when I initially recorded it).
To get this macro to work, I had to do something slightly different.
Starting at the same point (cursor on and highlighting the open-paren after vector_error_17), I type:
CTRL+F11 (turns Macro Recording On)
LEFT ARROW (to get rid of selection)
RIGHT ARROW (to get back beside open paren)
SHIFT+END (highlight to end of line)
DELETE (Delete everything after the end of the open-paren)
CTRL+G (go to next open-paren)
CTRL+F12 (turns Macro Recording Off)
I saved this macro as "works" because it does exactly what I wanted. My question is, why do I have to do the left-arrow + right-arrow thing to deselect before doing the rest of my macro? I know I didn't have to do this back with SE6.
Thanks for any help/guidance!
For further info, here's the Slick-C code for both of the macros:
_command works() name_info(','VSARG2_MACRO|VSARG2_MARK|VSARG2_REQUIRES_MDI_EDITORCTL)
{
_macro('R',1);
_deselect();
cursor_left();
cursor_right();
deselect();
_select_char('','E');
end_line();
select_it('CHAR','','E');
delete_selection();
find_next();
}
_command no_works() name_info(','VSARG2_MACRO|VSARG2_MARK|VSARG2_REQUIRES_MDI_EDITORCTL)
{
_macro('R',1);
end_line();
select_it('CHAR','','E');
delete_selection();
find_next();
}