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
 Weird Close Parenthesis behavior
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

joeyhammer
New Member

USA
4 Posts

Posted - Dec 28 2019 :  7:23:35 PM  Show Profile  Reply with Quote
I recently started noticing some weird parenthesis behavior when I'm typing. I know it is Visual Assist because the behavior does not happen when I have Visual Assist deactivated.

I'm using C# in VS2019 16.4.2; VA_X_Setup2358_0.exe.

Let's say I have a function call already typed out:
Run()

If I go to insert a parameter that is a function call, say `GetValue()`.
I want to end up with this:
Run(GetValue())

But as I'm typing, Visual Assist associates the closing parenthesis I type with the new open parenthesis, so I end up typing this:
Run(GetValue()

with my cursor after the closing parenthesis.

No options in the Visual Assist Options dialog seem to adjust this behavior. I have turned most of the options off to see if it was connected to one of the options.

Here is a GIF to show what I described above:



To be clear, at the end of that GIF, I do not press the right arrow key to move the cursor to the right of the existing parenthesis, I type ')' and it does not insert a new close parenthesis.

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Dec 29 2019 :  4:06:50 PM  Show Profile  Reply with Quote
If you disable the below setting, it will also disable this behaviour:

VA Options -> Editor -> Insert () and closing } ) ] ; "

Otherwise, this happens because Visual Assist seems to think that a ) was inserted automatically which needs to be skipped.

Another possibility is that Visual Studio's automatic brace completion is enabled and clashing? Can you also try turing the below setting off so you may be able to keep Visual Assist's brace completion?

Tools -> Options -> Text Editor -> C++ -> General -> Automatic brace completion

Edited by - accord on Dec 29 2019 4:07:45 PM
Go to Top of Page

joeyhammer
New Member

USA
4 Posts

Posted - Dec 29 2019 :  6:34:16 PM  Show Profile  Reply with Quote
I'm sorry to say that the option you suggested is not the issue. I usually run with that option off.

Here is a GIF to that shows the behavior when Visual Assist is active (with the "Insert () and closing } ) ] ; " option unchecked).




Then, I disable Visual Assist and show that the closing parenthesis does in fact get inserted (as expected):




Sorry the GIFs are a little choppy -- I had it as one GIF, but the forums don't allow files larger than 100K so I had to cut it up.

Also, the Visual Studio "Automatic brace completion" option is off (I normally run with it off).




Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19014 Posts

Posted - Dec 30 2019 :  07:34:14 AM  Show Profile  Reply with Quote
I am seeing the same problem here, I am just trying to pin down why this is happening.

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

feline
Whole Tomato Software

United Kingdom
19014 Posts

Posted - Dec 30 2019 :  11:49:10 AM  Show Profile  Reply with Quote
Can you please look and see if you have:

VA Options -> Suggestions -> Suggestion and Completion lists
Enable in C#

turned On or Off, and if this is turned Off, turn it On and see if this makes any difference to what you are seeing?

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

joeyhammer
New Member

USA
4 Posts

Posted - Dec 30 2019 :  1:21:36 PM  Show Profile  Reply with Quote
The "Suggestion and Completion lists" for C# was indeed off.

Turning it on does seem to be a fix for the issue.

Thank you very much for finding this!

I'm guessing that the behavior when the "Suggestion and Completion lists" feature is off is unintentional? Seems quite unexpected otherwise.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19014 Posts

Posted - Dec 30 2019 :  2:11:15 PM  Show Profile  Reply with Quote
I have been able to reproduce something when typing the "Run()" function manually, but not when accepting it from a listbox. Does this match what you have been doing and seeing?

Yes, being dependent on the suggestion lists setting does seem rather unexpected:

case=141682

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

joeyhammer
New Member

USA
4 Posts

Posted - Dec 30 2019 :  5:14:49 PM  Show Profile  Reply with Quote
Yes, I was only seeing the issue when typing the function name manually.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19014 Posts

Posted - Dec 31 2019 :  06:55:06 AM  Show Profile  Reply with Quote
This makes sense at least. When you accept a listbox, VA knows you have finished typing the symbol name, and also knows if the symbol is a function or not. So at this point we know if we should add the () at the end or not. But if you simply type the full function name without accepting a listbox, we don't have the same knowledge. So two different paths through VA's logic.

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