Or it may be implemented without a timer: simply save each caret movement, but if the latest element in the caret history stack was added, say, less than a second ago, overwrite it (except for some cases, listed below). You don't need to keep the time for each position in the stack, the latest addition time variable is enough. In fact it shouldn't be real time, but monotonic time.
Perhaps there should be some additional checks, for example make sure to save (not to reset or overwrite):
Actually, I see that there is already Code Navigation History, it should save the location before code navigation, maybe it can be merged with the new system, or even the new system can be built atop of it.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.