Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 No closing brace (sometimes)

You must be registered to post a reply.
Click here to register.

Screensize:
UserName:
Password:
Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji
   
Message:

Forum code is on.
Html is off.

 
Check to subscribe to this topic.
   

T O P I C    R E V I E W
Jef f Bean Posted - May 16 2007 : 11:54:25 AM
Using Visual Studio 2005 SP1 and Visual Assist X 10.3.1555.0, with the "Insert () and closing })]'" option turned on, start a new project and solution, create an empty .cpp file and paste in the following code:

int SomeFunction()
{
    if (x)
         
    return 1;
}

With the cursor immediately under the x, enter a left brace {. I expect to get an opening and closing brace, but instead I just get a single opening brace. On the other hand, if there are two blank lines below the if statement, then it does give me both the opening and closing brace.

Is this a bug, or I am misunderstanding how this is supposed to work?
5   L A T E S T    R E P L I E S    (Newest First)
feline Posted - May 19 2007 : 4:36:35 PM
I am seeing the same effect here.

case=6674

Easy to reproduce, but as you have found, you have to have everything exactly so.
Jef f Bean Posted - May 18 2007 : 11:13:45 AM
Try resetting the VS2005 tabs option to "insert spaces" instead of "keep tabs". I originally encountered this problem when I was working with a file that had tabs embedded in it, but my tabs option was set to "insert spaces".

If the file contains a tab before the return and my options are set to "keep tabs" then everything works. If the file contains a tab before the return and my options are set to "insert spaces" then it fails, but only if there is just one blank line between the 'if' and the 'return'. Note that in your picture you have two blank lines, so it is going to work regardless of the tabs setting.
feline Posted - May 18 2007 : 10:51:01 AM
I have the files you sent, thank you for that. So far I have been unable to reproduce the problem. I have turned on show white space in VS2005 so I can see what I am doing, and my current test looks like this:



When I type '{' at the current caret position both brackets are inserted. Is this the same white space you are using?
Jef f Bean Posted - May 17 2007 : 2:44:20 PM
A zipped copy of the solution/project is on its way.

At first I was not able to reproduce the problem either, but can now do so consistently. It seems to depend on the exact type of white space that is present.

The complete steps I went through were:
1. Start a new empty project and solution named Test
2. Use File/New to open a new empty .cpp file
3. Paste in the following code:

int SomeFunction()
{
    if (x)
        
	return 1;
}


There are four spaces before the if but there is a single tab character before the return. The tab seems to be essential. If you replace it with four spaces the problem does not occur.

4. Place the cursor under the (x) and press {.
feline Posted - May 17 2007 : 1:39:49 PM
I would call this a bug. So far I cannot reproduce this problem.

Can you reproduce this on demand? If so can you save out the test project with the correct white space in it, so that you open the file, place the caret at the end, press '{' and see the bug?

If so would you be able to send me a copy of this test project? Please submit the files via the form:

http://www.wholetomato.com/support/contact.asp

including this thread ID or URL in the description, so we can match it up.

That way we will both be testing the same thing.

© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000