Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 List Methods in Current File wrecks selection

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
jschroedl Posted - Jun 02 2021 : 12:15:02 PM
I just updated VA and now Alt+M will select the name of the method I navigate to.

I've gotten bit a couple of times now where I'll have something selected, want to visit another method to check something and then return to the previous selected text with Alt+'-' but my old selection is gone now.

I've searched the options but don't see how to disable this. How can I turn off that behavior?
4   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Jun 04 2021 : 05:26:05 AM
I use this setting as well, but for the cases when I want the highlighting to be less "fragile" I use Ctrl-K, which uses a different highlight colour, and stays highlighted until I do a find.

Basically, moving the caret, which Alt-M does, by definition, is normally enough to remove the symbol under cursor highlighting.
jschroedl Posted - Jun 03 2021 : 4:31:24 PM
I don't know which version I came from. It had been a long time since I'd seen the "there's a new version available" pop up and that check had somehow gotten disabled.

I was thinking of this one.
VA Options -> Highlighting -> Highlight write and read references to symbol under cursor

I will keep using the current version and see if I can adapt.
feline Posted - Jun 03 2021 : 09:04:27 AM
Do you remember, approximately, which version of VA you were using before?

Testing VS2019 and VA 2399, the previous build, when you use the Alt-M list the keyboard caret jumps "to" the function you have selected from the Alt-M list, but nothing is selected. However, since the caret has been moved, any selected code is no longer selected. To make sure this isn't due to a set of recent changes, I have also checked this with VA 2001, a good 8 years old, in VS2010, and I get exactly the same behaviour, jumping via Alt-M removes the current selection.

I have double checked this with a 10 line method, selected 3 lines in the middle of the method, and then jumped to the method name, so no scrolling happened. The selection was removed, since the caret moved away from the selected test.

In case it matters, I did the text selection by holding down the Shift key and using the Up and Down arrow keys to select several lines. Perhaps if you used a different method to select code it would behave differently? But off the top of my head I am not sure how you would do such a selection.

For the word being highlighted throughout the file, how was the highlighting triggered? You can tell VA to highlight find results:

VA Options -> Highlighting -> Highlight results of Quick Find and Find in Files

When I do this, using Alt-M has no effect on the highlighting.

But, if instead, you are using:

VA Options -> Highlighting -> Highlight write and read references to symbol under cursor

then using Alt-M to place the caret into a different symbol name will replace the current highlighting with the new symbol name. This has changed in the current build of VA, since before VA placed the caret at the opening curly bracket of the method you jumped to. Now the caret is placed at the start of the method name.

Due to the fragile nature of highlighting the symbol under the cursor I have mapped CTRL-K to the command:

VAssistX.FindSelected

which tells VA to highlight all references of the symbol the caret is currently in, as if you did a Find, but without needing to step through the Find dialog.
jschroedl Posted - Jun 02 2021 : 1:08:08 PM
Another use case where I don't like this... I select a word and it's highlighted throughout my file then visit various methods using Alt+M but the selection is wrong now.

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