Use hybrid, deterministic + cursorPositionChanged for location history
This change is an attempt to make location history more useful / usable. Instead of just relying on cursorPositionChanged
, this change introduces a new signal posChanged()
which a plugin-view can emit whenever it jumps to a position. For the existing stuff i.e., cursorPositionChanged
is considered as a valid location to be saved if it is at least viewCountLines = lastDisplayedLine - firstDisplayedLine
away.
Benefits:
- This results in a cleaner location history
- We don't have to worry about locations resulting from typing / selection
- We can save location properly whenever we jump to a new file use quick-open
Signed-off-by: Waqar Ahmed waqar.17a@gmail.com
Edited by Waqar Ahmed