Recaf icon indicating copy to clipboard operation
Recaf copied to clipboard

Jump to the previous location

Open xroberx opened this issue 10 months ago • 1 comments

Hi!

Something that would be really handy is a shortcut (Ctrl+Left or Alt+Left) to jump to the previous location when you go to another method/field/class. This would be a huge time saver, because currently this has to be done manually (unless I am missing something of course). Just being able to jump to the previous location would be great, although a full-blown history of jump locations would be even better.

Best regards, Robert.

xroberx avatar Mar 06 '25 23:03 xroberx

Image

Notes for later:

  • Adding a "jump to previous" would likely want to intercept calls to requestFocus(ClassMember) and add them to a Stack
    • Keybinds would allow moving a "pointer" through the stack.
    • Focusing on something will cut off anything beyond the pointer and add the focused item to the end.
    • Old stack entries (max collection size, maybe 100) would be pruned.
    • The stack's entry model should be simple and not hold references to exact ClassInfo/Member types to prevent leakages when garbage collecting.
  • Calls to navigate to methods in the UI are done through this requestFocus(ClassMember) but the places where it is called are scattered
    • Maybe centralize them somewhere and then do interception in this one place?
    • Current scattering is because some places have ez access to the ClassNavigable reference, so centralization will be adding some indirection

Col-E avatar Sep 08 '25 03:09 Col-E