A while back I was working on a script to enclose comments in my code to make them stand out. I started out by modifying Mofi's equal sign alignment script and quickly had a working script that would locate the longest line in the selected comment block, space pad the rest of the lines to match and add the | character to build a box around the block.
Except that it didn't work right when there were tabs on lines in the block. So I added in the Tabs To Spaces command in my script - and - it still didn't work.
The help for the Tabs To Spaces command says that it converts ALL tabs to spaces in selected text or in the entire file if no text is selected. Even though not mentioned there is an exception to that of course in that tabs inside of a text string are not converted. Well it seems that I found another exception. But while protecting tabs in a text string makes complete sense, doing the same for a comment is usually not desired. Say for example when a block of code is commented out for testing.
I did some more experimenting and found that if the comment is a block comment, then if you select the text so that all of it is between the start comment and end comment markers then the selected text will respond to the change command. If the inline comment marker is used, selected text cannot be changed even if the comment character is not part of the selection.
This is in UE 21.20.0.1004 running on Windows Enterprise Edition 64bit.
Except that it didn't work right when there were tabs on lines in the block. So I added in the Tabs To Spaces command in my script - and - it still didn't work.
The help for the Tabs To Spaces command says that it converts ALL tabs to spaces in selected text or in the entire file if no text is selected. Even though not mentioned there is an exception to that of course in that tabs inside of a text string are not converted. Well it seems that I found another exception. But while protecting tabs in a text string makes complete sense, doing the same for a comment is usually not desired. Say for example when a block of code is commented out for testing.
I did some more experimenting and found that if the comment is a block comment, then if you select the text so that all of it is between the start comment and end comment markers then the selected text will respond to the change command. If the inline comment marker is used, selected text cannot be changed even if the comment character is not part of the selection.
This is in UE 21.20.0.1004 running on Windows Enterprise Edition 64bit.