IDE, SynEdit: fix (do not let the IDE center the editor afterwards) option to have bookmarks restore the scroll pos. Issue #40912

This commit is contained in:
Martin 2024-09-28 15:40:04 +02:00
parent a8b85cf2e7
commit 0fff873d53

View File

@ -77,6 +77,7 @@ uses
{$IFDEF LCLCocoa} CocoaConfig, CocoaIDEFormConfig,{$ENDIF}
// SynEdit
SynEdit, AllSynEdit, SynEditKeyCmds, SynEditMarks, SynEditHighlighter, SynHighlighterPas,
SynEditTypes,
// BuildIntf
BaseIDEIntf, MacroIntf, NewItemIntf, IDEExternToolIntf, LazMsgWorker,
PackageIntf, ProjectIntf, CompOptsIntf, IDEOptionsIntf, ComponentReg,
@ -11486,7 +11487,7 @@ begin
try
AnEditor.BeginUpdate;
AnEditor.EditorComponent.GotoBookMark(ID);
if not AnEditor.IsLocked then
if not (AnEditor.IsLocked or (eoBookmarkRestoresScroll in AnEditor.EditorComponent.Options2)) then
AnEditor.CenterCursor(True);
finally
AnEditor.EndUpdate;