Sublime Forum

Add to jump_back history stack


How do we add the current location of the cursor to the history stack before moving the cursor, so that the user can use jump_back to get back?

For example, if the user is currently on line 1, and invoking the plugin takes them to line 15, and then invoking the plugin again takes them to line 55. The behavior I want is that jump_back should take them to line 15. Currently, it goes back to line 1, because I’m assuming that’s on the top of the history stack, and my plugin didn’t add line 15 to the history stack.



Related: There