Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Technical Support
 1533: Inserted brace indentation wrong
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

briancollins
Senior Member

United Kingdom
39 Posts

Posted - Aug 30 2006 :  09:35:21 AM  Show Profile  Reply with Quote
New in 1533 (ok before) with C# in VS 2003:

When I type (e.g.) "if ( true )" then <CR> then a open brace, a blank line and closing brace are added as exppected. The problem is that the closing brace appears at indent zero and the cursor ends up on the blank line, but one tab stop to the LEFT of the opening brace - i.e. two stops back from where it should be. Pressing <Del><CR> somehow corrects the situation, but obviously should not do so.

Anyone else getting this?

Brian

rhummer
Tomato Guru

USA
527 Posts

Posted - Aug 30 2006 :  10:40:24 AM  Show Profile  Reply with Quote
can you paste code of what you are seeing? I'm drawing a blank and what you mean by <CR> Not sure what key that is, but it is early in the morning for me :p

Tools Engineer - Raven Software
VS2005 SP2/VS2008 SP1 - VAX <LATEST> - Win 7 x64

Go to Top of Page

briancollins
Senior Member

United Kingdom
39 Posts

Posted - Aug 30 2006 :  11:02:44 AM  Show Profile  Reply with Quote
I haven't worked out how to post an image here, but I can fake it (with the "|" character representing the caret:

Starting with

        if ( true )|
I press "Return" (aka <CR>). This gives me

        if ( true )
            |
which is fine.

I then press "{" and get

        if ( true )
        {
        |
}
on one machine and

        if ( true )
        {
    |
}
on the other. Neither is as expected.

If I then press "Delete" and "Return", I get to the correct:

        if ( true )
        {
            |
        }


Is that clearer?

Brian
Go to Top of Page

rhummer
Tomato Guru

USA
527 Posts

Posted - Aug 30 2006 :  11:42:13 AM  Show Profile  Reply with Quote
Yeah thats clear. hm.. You can only reproduce this in C#? Have you tried in C++. It seems odd that it would only occur in one langauge, and not all. I haven't been able to reproduce it yet. Though I'm not in C# which is why I as about a C++ project or file.

Tools Engineer - Raven Software
VS2005 SP2/VS2008 SP1 - VAX <LATEST> - Win 7 x64

Go to Top of Page

briancollins
Senior Member

United Kingdom
39 Posts

Posted - Aug 30 2006 :  11:55:17 AM  Show Profile  Reply with Quote
Just tried it with C++ and it works perfectly. Very odd! It appears to be C# only.

Brian
Go to Top of Page

thruska
Ketchup Master

71 Posts

Posted - Aug 30 2006 :  1:06:00 PM  Show Profile  Reply with Quote
I had something similar happen in C++ when I turned off autoindenting but left the "insert automatic closing )}], etc." when typing "({[" on. But that was 1446. Haven't tried it since. I don't like anything that auto-indents for me (although, I DO use Ctrl+K, Ctrl+F frequently...but that's "manual" and it doesn't do switch-case the way I like).

Thomas Hruska
CubicleSoft President
http://www.cubiclesoft.com/
Go to Top of Page

rhummer
Tomato Guru

USA
527 Posts

Posted - Aug 30 2006 :  6:54:06 PM  Show Profile  Reply with Quote
Ok, at home were I can try it on a C# project in 2003. I cannot reproduce this. Would you have some kind of different setting in your Options -> Text Editor -> C# ? I run a default setup, minus line numbers.

Tools Engineer - Raven Software
VS2005 SP2/VS2008 SP1 - VAX <LATEST> - Win 7 x64

Go to Top of Page

sean
Whole Tomato Software

USA
2817 Posts

Posted - Aug 30 2006 :  10:43:43 PM  Show Profile  Reply with Quote
got it - case=2299
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000