Sorry for not being clear.
I have 2 computers running Slick Edit. I am running the same version of Slick Edit and used the 14.0 feature of exporting the office computer's configuration and importing to the home computer's configurations. Last week, when I started writing and using this macro, I was on my home computer. I am now at my office, trying to use the same macro.
When the last word on the line does not contain a StopCharacter, using delete_char causes the macro to hang. I figured this was because the macro was programmed to loop on delete_char until it gets to a StopCharacter. Since the EOL (End of Line) was not a StopCharacter, the macro sits there forever. This happens on both computers.
On the home computer, I switched to using linewrap_delete_char, but then when I got to the last word in the line, it deleted to the end of the line and all subsequent blank lines until it got to a line with text in it. This was too much deleting, since I wanted it to stop at the end of the line.
I have now tried this on my office computer, but I don't get the multiple line deletions. As a matter of fact it stops at the end of the line, exactly as I want it.
This makes me think there is a difference between the setup on both computers. Unfortunately, I think not everything about the configurations was transferred. I will try the old technique of copying the configuration folder and see if that makes both computers behave the same. I will have to do this tonight and let you know the results.
FYI: Here is the current version of the macro:
// DeleteToStopChar deletes white space and non-white space until it hits a stop character
_command DeleteToStopChar() name_info(','VSARG2_MACRO|VSARG2_MARK|VSARG2_REQUIRES_MDI_EDITORCTL)
{
_str StopCharacters = '()[]{}.,;: /'; // characters to stop at
if (isspace(get_text(1) ) ) { // check to see if it is a space
message("Deleted spaces");
while (isspace(get_text(1) ) ) // continue deleting while it is a space
linewrap_delete_char(); // delete the space
// delete_char(); // delete the space
}
else if ( ! verify (StopCharacters, get_text(1), 'M') ) { // check to see if it is not a StopCharacter
message("Deleted until StopCharacter");
while ( ! verify (StopCharacters, get_text(1), 'M') ) // continue deleting while it is not a StopCharacter
linewrap_delete_char(); // delete the non StopCharacer
// delete_char(); // delete the non StopCharacer - macro hangs at the end of the line
}
else {
message("Deleted single character");
linewrap_delete_char(); // delete the single character
// delete_char(); // delete the single character
}
}