You don't get it as part of the undo.
But there is a jump history. And if the caret was moved more than a few lines, then this is added to the jump history
IIRC default is ctrl-h, but you can map it to other keys.
You can also use the 4th/5th mouse button.
And there is a window in the "View" menu.
And the editor toolbar (install package) can offer buttons.