Author |
Topic |
|
briancollins
Senior Member
United Kingdom
39 Posts |
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 |
|
rhummer
Tomato Guru
USA
527 Posts |
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 |
Tools Engineer - Raven Software VS2005 SP2/VS2008 SP1 - VAX <LATEST> - Win 7 x64
|
|
|
briancollins
Senior Member
United Kingdom
39 Posts |
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
Tomato Guru
USA
527 Posts |
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. |
Tools Engineer - Raven Software VS2005 SP2/VS2008 SP1 - VAX <LATEST> - Win 7 x64
|
|
|
briancollins
Senior Member
United Kingdom
39 Posts |
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 |
|
|
thruska
Ketchup Master
71 Posts |
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).
|
Thomas Hruska CubicleSoft President http://www.cubiclesoft.com/ |
|
|
rhummer
Tomato Guru
USA
527 Posts |
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. |
Tools Engineer - Raven Software VS2005 SP2/VS2008 SP1 - VAX <LATEST> - Win 7 x64
|
|
|
sean
Whole Tomato Software
USA
2817 Posts |
Posted - Aug 30 2006 : 10:43:43 PM
|
got it - case=2299 |
|
|
|
Topic |
|