AndroidIDE icon indicating copy to clipboard operation
AndroidIDE copied to clipboard

[Feature]: Ability to jump back to previous location after performing a "Go to definition" action

Open gituser1000000 opened this issue 2 years ago • 1 comments

Feature description

After performing a "Go to definition" action on a selected identifier, we are teleported to the location where the identifier (if valid) is defined. We need a way to quickly get back to the location before the action was performed.

The whole point of this action was part of the goal of being able to quickly navigate around in the editor. However, if we have to remember the location, find, and scroll (possibly a long scroll) back manually, it defeats the feature's original purpose. An analogy would be that we take our car to quickly drive to the supermarket but then have to walk on the way back home.

This also has helped show the possible need of keeping a history of locations that I mentioned in #1236

In addition, I think it would help if we could introduce a new concept/feature that keeps a separate (from the undo/redo) history of view port positions and/or the cursor positions.

What version of AndroidIDE you're using?

v2.5.2 (debug builds)

Duplicate issues

  • [X] This issue has not been reported yet.

Code of Conduct

  • [X] I agree to follow this project's Code of Conduct

gituser1000000 avatar Aug 30 '23 16:08 gituser1000000

With the backward/forward history implemented in #1246, this feature could be easily added by just creating a history point with the current positions of the cursor and view port right before jumping to the definition. Then all the user has to do is press the back key to jump back. Easy, smooth, and intuitive :)

gituser1000000 avatar Aug 30 '23 21:08 gituser1000000