You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The vertical position is not kept when going to definition then going back to last position. For example,
z z on some line in file A.
g d on some symbol to go into file B.
ctrl-o go back the file A, the vertical position is changed to some bottom position. One may need to z z again.
After some tests, the vertical position when going back to file seems to be always different from the original position no matter where one starts to jump from.
The text was updated successfully, but these errors were encountered:
Jump is defined as type Jump = (DocumentId, Selection), and Helix just tries to vertically center your selection on executing a jump. IMO this would be acceptable behavior if not for the fact that horizontal viewport offset is similarly naive, i.e if you save a location to the jumplist with Ctrl-s, then scroll the viewport off to the right on some long line, then hit Ctrl-o to jump back to your saved spot, the viewport won't jump back to its horizontal offset from when you saved the spot, because the jump simply does not remember where that was. We could either apply a similar transform horizontally as we do vertically (ensuring that the cursor is as centered as possible after the jump, right now we just ensure that it is in view) or add viewport position info to Jump so that we can return to exactly where we were when we saved the position. This then becomes another thing to update on any Transaction, so that the jumplist does not get out of sync with the the Document. The jumplist capacity was restricted a while ago by @the-mikedavis due to perf concerns, so I don't really have a sense for whether we can afford this, but the Helix jumplist is already much smaller than vim/nvim (30 vs 100), so we probably can? I like this change myself; I can get disoriented if the viewport moves from where I remember it being.
The vertical position is not kept when going to definition then going back to last position. For example,
z z
on some line in file A.g d
on some symbol to go into file B.ctrl-o
go back the file A, the vertical position is changed to some bottom position. One may need toz z
again.After some tests, the vertical position when going back to file seems to be always different from the original position no matter where one starts to jump from.
The text was updated successfully, but these errors were encountered: