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
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