Bug in DeleteHorizontalWhiteSpace

SyntaxEditor for Windows Forms Forum

Posted 14 years ago by Boyd - Automated Software Testing Consultant / Developer, Patterson Consulting, LLC
Avatar
In Visual C# 2005, the 'DeleteHorizontalWhiteSpace' command removes all leading/trailing white space from a line and reduces all internal white space to a single 'space'. In SyntaxEditor, executing this command will remove all white space from the line.

For example, I applied the 'DeleteHorizontalWhiteSpace' command to the following line of code:
    const NAME         =    "VALUE";    //Comment
In Visual C# 2005, the following was the result:
const NAME = "VALUE"; //Comment
In SyntaxEditor, the following was the result:
constNAME="VALUE";//Comment
In SyntaxEditor, you can see that the token 'const' and 'NAME' are now merged as a single token.

Comments (2)

Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
It looks like the functionality has changed a little from VS.NET 2002 to 2005. What do you recommend as the functionality being in each of two cases:

1) Where there is a selection.

2) Where there is no selection.


Actipro Software Support

Posted 14 years ago by Boyd - Automated Software Testing Consultant / Developer, Patterson Consulting, LLC
Avatar
If there is a selection, it appears the functionality should be to remove any leading or trailing white space (beginning or end of line respectively) completely and then reduce any internal white space to a single space (within the bounds of the selection).

If there is no selection and the caret is over white space, all white space immediately before the caret, under the caret, and immediately after the caret should be reduced to a single space.

If there is no selection and the caret is not over white space, no action should be performed.

As best I can tell, that's how VS 2005 works.

[ 01-16-2005: Message edited by: Boyd ]
The latest build of this product (v2018.1 build 0341) was released 6 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.