T O P I C R E V I E W |
scottbilas |
Posted - Jan 05 2009 : 6:17:45 PM I believe I have this down to a simple repro.
1. Open any C++ file that has references to another file in it. Make sure that other file is not opened. 2. Open the Code Definition Window (Ctrl \\ Ctrl D). Not sure if it matters but on mine this window is undocked and floating off to the side of the VS window. 3. In the code window, use Alt-G on a reference to make it open another C++ file.
The problem: in this new file that is opened, about 90% of the time for me the cursor goes to the top of the window. I expect it to be placed right on the symbol instead.
If I ctrl-tab back to the first file, then Alt-G again, then the cursor properly appears in the other file in the right place.
This does not happen if Code Definition Window is closed. And it does not happen if the referenced C++ file is already open.
Another tidbit: after step 3 above I do View | Navigate Backward then View | Navigate Forward then it goes back to the first file, then forward to the referenced file but leaves the cursor in the proper spot.
If I use the built-in VS feature "Go to Definition" instead of VAX then it always works properly. In fact, it selects the symbol as well, which I like a lot better than VAX's simple cursor placement, but that's a side issue. |
5 L A T E S T R E P L I E S (Newest First) |
support |
Posted - Aug 04 2010 : 5:43:58 PM case=22548 is fixed in build 1829 |
scottbilas |
Posted - Jan 07 2009 : 5:37:26 PM Ah! Didn't realize that Alt-G worked when I wasn't on the symbol itself. Thanks for the tip. |
accord |
Posted - Jan 07 2009 : 5:33:58 PM We are considering to place the cursor at symbol's position instead of start of line:
case=19499
Regardless of this, after alt+g takes you to the function, you can jump between the definition and the declaration by simply pressing alt+g again, even if you are at the beginning of the line. |
scottbilas |
Posted - Jan 06 2009 : 4:56:08 PM Cool, thanks for investigating and filing the issue.
Regarding the cursor placement, I am using the current line highlight feature, and like it a lot (dot drawing mode is my favorite). My problem isn't that I can't see the caret easily, it's that I have to do extra work to get to the symbol I was navigating to.
Consider this scenario. Say you Alt-G from some source to go to a function. VAX gives the drop down of whether you want it from the cpp or h file, and you pick the h file to look at the docs. Then you want to go to the function's definition in the cpp file, so you Alt-G again, but oops! The cursor is at the start of the line.
So you ctrl-right ctrl-right a few times to get past the return type, then get to the function name, then you can hit Alt-G and go to its implementation.
It would save work if Alt-G always ended with the cursor right at the start of the symbol or the relevant block of code. Would you mind opening this as an improvement request? |
accord |
Posted - Jan 06 2009 : 4:46:40 PM I am seeing the same effect here. Thank you for the clear description.
case=22548
About your second observation: you may want to try our relative new feature which highlights the current line:
VA Options -> Advanced -> Display -> Highlight current line
This isn't exactly what you want, but helps to find the caret after you use alt+G. |
|
|