VC7.1 .net2003 VAX 1237 when editing I sometime lose a traling brace. to repro, do this, with insert closing brace on.
1.
int f() { }
2. int f() { if(1) { } }
3. then erase the closing brace from the if() clause and retype it. The closing brace from the f() clause moves up to complete the if() like this.
int f() { if(1) { }
You seem to have to erase the brace from it's right (using backspace). Using delete from it's left doesn't cause the problem. After retyping the final brace, subsequent erasure and re-typing of the closing if() brace works fine.
We can reproduce the problem if we set tab indent to "None."
Typing a } after one was recently auto-inserted makes VA X overwrite. If you move or edit (anything but type straight text,) before typing a }, VA X inserts a new one. It forgets it auto-inserted.
In your example, you need only a down arrow to move the caret to the desired position for the Backspace. Unfortunately, down arrow does not make VA X forget. Left and right do.
The code I posted did not come out as intended because I didn't know how to put tabs in (the TAB key takes me to the .sig check box) So it should look like 1.