Bug with pressing ENTER and carrot position in build 219

Build 219/VS2005:

I was typing a new method in a class definition (this is what I had, note
the cursor position):

public static SomeType Foo(SomeOtherType someParameter)
{|
}

When I pressed enter, instead of opening the line and having the cursor
placed in the new blank line, I saw this:

public static SomeType Foo(SomeOtherType someParameter)
{

}

Needless to say, this screwed things up for me. If the closing brace was on
the same line, like this:

public static SomeType Foo(SomeOtherType someParameter)
{

}

Then things worked as expected.

I also experienced bizzare behavior in trying to add some XDOC comments to
this method. I put my cursor here:

public static SomeType Foo(SomeOtherType someParameter)
{

}

And pressed enter to get a blank line so I could type "///" ... but instead
I saw this:


| public static SomeType Foo(SomeOtherType someParameter)
{

}

VERY odd. But even more odd is a behavior I can duplicate only SOME of the
time. In the above scenereo, when I pressed enter and a blank line was
inserted and the carrot moved to in front of the "public" key word, the code
window snapped up to the top of the file. The cursor was still in that
(incorrect) position, but it was as if the scroll bar was yanked up to the
top of the file. VERY VERY odd. I've duplicated this several times, but it
doesn't happen every time, so I'm not sure exactly what is triggering the
repositioning of the view within the file.

Needless to say there are some serious quirks in the handling of the ENTER
key at the moment :)


5 comments
Comment actions Permalink

Some additional data:

In every case, pressing up arrow moved the carret back into it's proper
place.

I next tried to do a "foreach" live template expansion but got an exception
when trying to expand. The result was that it ended up eating a little of
the code (a couple of "undos" fixed that). This was exception 18244. Since
I could not get a foreach to expand, I figured something internal got hosed,
so I closed down VS2005 and restarted it and reloaded my solution.

At this point, the cursor is going to the right place after hitting ENTER,
so something got messed up internally somehow. However, I still can't get a
live template expansion. Attempts to do so result in no field substitutions
or guessing... it doesn't crash, but this is all I get:

foreach (object obj in collection_to_loop)
{


}

After switching focus to another app (this one I'm typing into now, in fact)
and back, however, the foreach expansion is working again. I'm guessing
that has to do with parsing, but all files were parsed at that time, and the
status control in the upper right was currently red (due to the fact I
wasn't finished writing this method so there was no return value).

So it appears something got mucked up before that caused the ENTER
weirdness.


"Paul Bradshaw" <pbradshaw@advsol.com> wrote in message
news:dtdgds$kg1$1@is.intellij.net...
> Build 219/VS2005:
>
> I was typing a new method in a class definition (this is what I had, note
> the cursor position):
>
> public static SomeType Foo(SomeOtherType someParameter)
> {

}

>

When I pressed enter, instead of opening the line and having the cursor
placed in the new blank line, I saw this:

>

public static SomeType Foo(SomeOtherType someParameter)
{

>

| }

>

Needless to say, this screwed things up for me. If the closing brace was
on the same line, like this:

>

public static SomeType Foo(SomeOtherType someParameter)
{| }

>

Then things worked as expected.

>

I also experienced bizzare behavior in trying to add some XDOC comments to
this method. I put my cursor here:

>

|
public static SomeType Foo(SomeOtherType someParameter)
{

>

}

>

And pressed enter to get a blank line so I could type "///" ... but
instead I saw this:

>
>

| public static SomeType Foo(SomeOtherType someParameter)
{

>

}

>

VERY odd. But even more odd is a behavior I can duplicate only SOME of
the time. In the above scenereo, when I pressed enter and a blank line
was inserted and the carrot moved to in front of the "public" key word,
the code window snapped up to the top of the file. The cursor was still
in that (incorrect) position, but it was as if the scroll bar was yanked
up to the top of the file. VERY VERY odd. I've duplicated this several
times, but it doesn't happen every time, so I'm not sure exactly what is
triggering the repositioning of the view within the file.

>

Needless to say there are some serious quirks in the handling of the ENTER
key at the moment :)

>



0
Comment actions Permalink

Unfortunately, I can't reproduce such weird begavour :(
Is it reproducable at your side on some small example?

--
Eugene Pasynkov
Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
"Paul Bradshaw" <pbradshaw@advsol.com> wrote in message
news:dtdgds$kg1$1@is.intellij.net...

Build 219/VS2005:

>

I was typing a new method in a class definition (this is what I had, note
the cursor position):

>

public static SomeType Foo(SomeOtherType someParameter)
{|
}

>

When I pressed enter, instead of opening the line and having the cursor
placed in the new blank line, I saw this:

>

public static SomeType Foo(SomeOtherType someParameter)
{

>

| }

>

Needless to say, this screwed things up for me. If the closing brace was
on the same line, like this:

>

public static SomeType Foo(SomeOtherType someParameter)
{| }

>

Then things worked as expected.

>

I also experienced bizzare behavior in trying to add some XDOC comments to
this method. I put my cursor here:

>

|
public static SomeType Foo(SomeOtherType someParameter)
{

>

}

>

And pressed enter to get a blank line so I could type "///" ... but
instead I saw this:

>
>

| public static SomeType Foo(SomeOtherType someParameter)
{

>

}

>

VERY odd. But even more odd is a behavior I can duplicate only SOME of
the time. In the above scenereo, when I pressed enter and a blank line
was inserted and the carrot moved to in front of the "public" key word,
the code window snapped up to the top of the file. The cursor was still
in that (incorrect) position, but it was as if the scroll bar was yanked
up to the top of the file. VERY VERY odd. I've duplicated this several
times, but it doesn't happen every time, so I'm not sure exactly what is
triggering the repositioning of the view within the file.

>

Needless to say there are some serious quirks in the handling of the ENTER
key at the moment :)

>



0
Comment actions Permalink

Carrot position? LOL


0
Comment actions Permalink

I've found and fixed this problem.

--
Eugene Pasynkov
Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
"Paul Bradshaw" <pbradshaw@advsol.com> wrote in message
news:dtdgds$kg1$1@is.intellij.net...

Build 219/VS2005:

>

I was typing a new method in a class definition (this is what I had, note
the cursor position):

>

public static SomeType Foo(SomeOtherType someParameter)
{|
}

>

When I pressed enter, instead of opening the line and having the cursor
placed in the new blank line, I saw this:

>

public static SomeType Foo(SomeOtherType someParameter)
{

>

| }

>

Needless to say, this screwed things up for me. If the closing brace was
on the same line, like this:

>

public static SomeType Foo(SomeOtherType someParameter)
{| }

>

Then things worked as expected.

>

I also experienced bizzare behavior in trying to add some XDOC comments to
this method. I put my cursor here:

>

|
public static SomeType Foo(SomeOtherType someParameter)
{

>

}

>

And pressed enter to get a blank line so I could type "///" ... but
instead I saw this:

>
>

| public static SomeType Foo(SomeOtherType someParameter)
{

>

}

>

VERY odd. But even more odd is a behavior I can duplicate only SOME of
the time. In the above scenereo, when I pressed enter and a blank line
was inserted and the carrot moved to in front of the "public" key word,
the code window snapped up to the top of the file. The cursor was still
in that (incorrect) position, but it was as if the scroll bar was yanked
up to the top of the file. VERY VERY odd. I've duplicated this several
times, but it doesn't happen every time, so I'm not sure exactly what is
triggering the repositioning of the view within the file.

>

Needless to say there are some serious quirks in the handling of the ENTER
key at the moment :)

>



0
Comment actions Permalink

Excellent! Thanks!

"Eugene Pasynkov (JetBrains)" <Eugene.Pasynkov@jetbrains.com> wrote in
message news:dtf7js$iht$1@is.intellij.net...

I've found and fixed this problem.

>

--
Eugene Pasynkov
Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
"Paul Bradshaw" <pbradshaw@advsol.com> wrote in message
news:dtdgds$kg1$1@is.intellij.net...

>> Build 219/VS2005:
>>
>> I was typing a new method in a class definition (this is what I had, note
>> the cursor position):
>>
>> public static SomeType Foo(SomeOtherType someParameter)
>> {|
>> }
>>
>> When I pressed enter, instead of opening the line and having the cursor
>> placed in the new blank line, I saw this:
>>
>> public static SomeType Foo(SomeOtherType someParameter)
>> {
>>
>> | }
>>
>> Needless to say, this screwed things up for me. If the closing brace was
>> on the same line, like this:
>>
>> public static SomeType Foo(SomeOtherType someParameter)
>> {| }
>>
>> Then things worked as expected.
>>
>> I also experienced bizzare behavior in trying to add some XDOC comments
>> to this method. I put my cursor here:
>>
>> |
>> public static SomeType Foo(SomeOtherType someParameter)
>> {
>>
>> }
>>
>> And pressed enter to get a blank line so I could type "///" ... but
>> instead I saw this:
>>
>>
>> | public static SomeType Foo(SomeOtherType someParameter)
>> {
>>
>> }
>>
>> VERY odd. But even more odd is a behavior I can duplicate only SOME of
>> the time. In the above scenereo, when I pressed enter and a blank line
>> was inserted and the carrot moved to in front of the "public" key word,
>> the code window snapped up to the top of the file. The cursor was still
>> in that (incorrect) position, but it was as if the scroll bar was yanked
>> up to the top of the file. VERY VERY odd. I've duplicated this several
>> times, but it doesn't happen every time, so I'm not sure exactly what is
>> triggering the repositioning of the view within the file.
>>
>> Needless to say there are some serious quirks in the handling of the
>> ENTER key at the moment :)
>>
>>
>



0

Please sign in to leave a comment.