Strange view in code editor 2021 R2

Anyone else having this problem here with 2021 R2 ?

EditorSnapping

Should I post a feedback or is the 65339 case covering that issue?

The Feedback case covers what you see. There is quite some prose in the Feedback case but nothing specific on the bug. I’ve been using 2021r2 for some weeks and don’t see the problems in the code editor at all. There must be a specific trigger.

Case 65339 covers that. As a workaround don’t put anything after Next, in other words, remove the i (maybe)

Edit: sorry, no. In your case the problem is i=0 make it i =0 and that fixes the problem. I’m not sure is the same as 65339

Hey, do me a favor and put a space between the i and the = to see if it clears that up.

1 Like

fori

Include that in the bug report. At least we know what the issue is.

Done

Yes, if I put a space in there it looks OK again. I do not envy you for that … :flushed:

Oh I know exactly what the problem is.

The space after the Next also causes it

1 Like

Hah, I would never see that as I always write:


for i = 0 to 10
3 Likes

Thanks. I always write a comment after Next, so that’s why my code has this issue.

As one should :slight_smile:

I saw it today with

For Each Entry As DictionaryEntry In SomeDictionary
Next Entry

I’ve used this syntax many times without issue, but nothing I tried helped at all. Sure enough, in another method I used the exact same line and there wasn’t a problem. I wish I had something more helpful to provide.