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
 List Methods in Current File wrecks selection
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

jschroedl
Tomato Guru

USA
103 Posts

Posted - Jun 02 2021 :  12:15:02 PM  Show Profile  Reply with Quote
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?

jschroedl
Tomato Guru

USA
103 Posts

Posted - Jun 02 2021 :  1:08:08 PM  Show Profile  Reply with Quote
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.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18727 Posts

Posted - Jun 03 2021 :  09:04:27 AM  Show Profile  Reply with Quote
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.

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

jschroedl
Tomato Guru

USA
103 Posts

Posted - Jun 03 2021 :  4:31:24 PM  Show Profile  Reply with Quote
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.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18727 Posts

Posted - Jun 04 2021 :  05:26:05 AM  Show Profile  Reply with Quote
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.

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