Odd visual results from End [...] followed by double-quote

  • Thread starter Thread starter John C Kirk
  • Start date Start date
J

John C Kirk

[This is a repost of a message that I sent to
microsoft.public.dotnet.vb.general on 16th December 2004; it looks
like this group is more active than that one, so there may be MVPs who
can read this and pass a bug report on to Microsoft if appropriate.]

I've just come across some slightly bizarre behaviour in VB.NET - if I
have some code like this:

Private Sub Fred()
End Sub

then put a " after Sub, and move to the next line, that whole line
(End Sub") changes. It looks like a CJK character at the start, and
then the other letters appear with varying background colours, with
some of them being blacked out.

If I then click back on the end of the line, and press any letter key
repeatedly (e.g. ddddddddd), the line changes each time I press the
key. Initially it's just random colour effects, but after about 35 key
presses I see the path to my source code folder. Another couple of key
presses, and the line changes to a random comment from elsewhere in
the file, and then other lines of code.

If I undo, or just press the Backspace key enough times, then I get
the original "End Sub" line back.

The same thing happens with End Class, #End Region, and probably most
other End statements (although not End If, for some reason). Maybe a
buffer overrun somewhere?

Anyway, it seems harmless enough, so if nothing else then it may amuse
people to see it in action.

John
 
John,

Which version of VS.NET are you running? I remember seeing some
similar bug in the 2002 release, but I believe it was fixed in 2003.



Mattias
 
Mattias,

Mattias Sjögren said:
Which version of VS.NET are you running? I remember seeing some
similar bug in the 2002 release, but I believe it was fixed in 2003.

I am able to repro the bug in VB 2002, and I remember a similar bug
involving '#Region...#End Region'.
 
Which version of VS.NET are you running? I remember seeing some
similar bug in the 2002 release, but I believe it was fixed in 2003.

This is happening in VS.NET 2003 (with SP1 for v1.1 of the .NET framework,
although that's probably not relevant). I've been able to duplicate it on 3
other PCs at work, and my home PC, so I don't think it's a machine specific
issue.

John
 
Chris said:
I am able to reproduce the bug in VS2003 as well.

I currently don't have my VS 2005 Beta 1 at hand, but I am curious if this
bug was fixed in the for this version...
 
I currently don't have my VS 2005 Beta 1 at hand, but I am curious if this
bug was fixed in the for this version...

Looks like it. In the December CTP release, I get a blue squiggly
under the " as expected.



Mattias
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top