Interesting idea. Though I wouldn't wanna loose the current mode.
Couple of other notes (that would need to be clarified for an implementation):
* "same location" is not well defined. Same amount of lines from the top? Same amount of lines from the bottom? Same "percentage" in the visible area? Include horizontal scroll location?
* In case of "same amount from top": If the bookmark was 30 lines from top (window may have more), and now the editor is in a window with only 25 lines visible, then it can't be placed 30 lines from top.
* Should the location be adjusted, even if the bookmark is in the visible area? I.e. if the bookmark wants to be on the top line, but currently is visible on the 3rd line? or currently is visible on the 35th line?
* What if the editor window is locked?
https://wiki.lazarus.freepascal.org/IDE_Window:_Editor_Options_MultiWindow#Locked.2C_if_text_in_view Should such an editor be considered for the bookmark (if it isn't on the desired location / the editor wont scroll)? Or should a different editor be found to show the bookmark?
* Currently, if the bookmark is on page, the editor will try to locate it at least IIRC 5 lines away from the top/bottom (except if "locked"). In case of "percentage" this would need to be considered, if it should be applied or not.
There are several ways to make that optional...
- Global option, toggle for all bookmarks.
- New Key-combos (that can replace the old ones), that will "goto as current" or "goto with location"
- New Key-combos (that can replace the old ones), that will SET the bookmark with/without remembering the location. (This could then still have key-combos to "goto ignoring location")
Until a decision is made, it may be possible to add editor macros (not tested). Though a bit tedious, because each bookmark would need a separate macro (and the macro would the be assigned to the ctrl-1 (or whatever bookmark num) key-combo).