Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 Weird Close Parenthesis behavior

You must be registered to post a reply.
Click here to register.

Screensize:
UserName:
Password:
Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji
   
Message:

Forum code is on.
Html is off.

 
Check to subscribe to this topic.
   

T O P I C    R E V I E W
joeyhammer Posted - Dec 28 2019 : 7:23:35 PM
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.

8   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Dec 31 2019 : 06:55:06 AM
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.
joeyhammer Posted - Dec 30 2019 : 5:14:49 PM
Yes, I was only seeing the issue when typing the function name manually.
feline Posted - Dec 30 2019 : 2:11:15 PM
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
joeyhammer Posted - Dec 30 2019 : 1:21:36 PM
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.
feline Posted - Dec 30 2019 : 11:49:10 AM
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?
feline Posted - Dec 30 2019 : 07:34:14 AM
I am seeing the same problem here, I am just trying to pin down why this is happening.
joeyhammer Posted - Dec 29 2019 : 6:34:16 PM
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).




accord Posted - Dec 29 2019 : 4:06:50 PM
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

© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000