Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 1533: Inserted brace indentation wrong

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
briancollins Posted - Aug 30 2006 : 09:35:21 AM
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
7   L A T E S T    R E P L I E S    (Newest First)
sean Posted - Aug 30 2006 : 10:43:43 PM
got it - case=2299
rhummer Posted - Aug 30 2006 : 6:54:06 PM
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.
thruska Posted - Aug 30 2006 : 1:06:00 PM
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).
briancollins Posted - Aug 30 2006 : 11:55:17 AM
Just tried it with C++ and it works perfectly. Very odd! It appears to be C# only.

Brian
rhummer Posted - Aug 30 2006 : 11:42:13 AM
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.
briancollins Posted - Aug 30 2006 : 11:02:44 AM
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
rhummer Posted - Aug 30 2006 : 10:40:24 AM
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

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