Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Technical Support
 Autoclose brace behaviour
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

lex
Senior Member

40 Posts

Posted - Apr 07 2018 :  10:02:07 AM  Show Profile  Reply with Quote
VA_X 10.9.2258.5

I think this is a bug.

The automatic closing of braces also adds a semicolon after the closing brace if appropriate, and then the cursor is placed between the braces:
struct A {$};
If you type a closing brace the cursor jumps over the automatically inserted one. But the semicolon can't be skipped by typing it, so you end up with:
struct A {};$;

It should either not add the semicolon at all, or remember it and skip it in the same way it does with the closing brace.

feline
Whole Tomato Software

United Kingdom
18983 Posts

Posted - Apr 07 2018 :  1:57:50 PM  Show Profile  Reply with Quote
I agree this isn't ideal. Is this something you often run into? I am wary of making things more complicated, rather than more simple and reliable.

There are some edge case bugs already with inserting closing brackets, and skipping over them. Here, what happens when you are moving around the code? What happens if you enter a semi-colon between the curly brackets, and then jump to the end of the line?

zen is the art of being at one with the two'ness
Go to Top of Page

lex
Senior Member

40 Posts

Posted - Apr 08 2018 :  05:37:51 AM  Show Profile  Reply with Quote
I wouldn't say often. It's just a minor annoyance when it happens.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18983 Posts

Posted - Apr 09 2018 :  2:41:18 PM  Show Profile  Reply with Quote
I am not sure how to approach fixing this without making things more complex and possibly unreliable most of the time. It's the edge cases where things get complex.

zen is the art of being at one with the two'ness
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000