Prevent Lazarus automatically switching tabs in code editor? lazarus / 9-Editor ---------------------------------------------------------------------- hayanninja · 2018-01-08 08:40 Let's say I have a source code file, "DataObject.pas". I also have a form, "FormDataObjectEditor.pas" (and corresponding LFM). I want to add various controls to FormDataObjectEditor.lfm in the IDE, but I want to have DataObject.pas open in the code editor window - perhaps so I can refer to it to see what controls I need to add. However, while I'm doing this, Lazarus seems to keep switching the code editor tab over to that of FormDataObjectEditor.pas, instead of keeping DataObject.pas active. Is this just an option I need to disable, or is this a bug? If the former, where do I find said option? (EDIT: Lazarus 1.8.0, running on Windows 10 Pro 64-bit. I *think* I've run into this issue, same Lazarus version, on Mac OSX High Sierra too, but I'm not 100% sure about this.) ---------------------------------------------------------------------- howardpc · 2018-01-08 08:50 In the IDE right-click on the tab of DataObject.pas and choose "Move to new window". Place the new window where it does not obscure "FormDataObjectEditor", and continue with designing your form. ---------------------------------------------------------------------- hayanninja · 2018-01-08 09:32 Okay, so it's a bug, but a workaround is known. Better than nothing. ---------------------------------------------------------------------- Bart · 2018-01-08 16:38 It's not a bug. It is by design. Bart ---------------------------------------------------------------------- hayanninja · 2018-01-10 06:59 Depends on one's definition of "bug". Some would argue that a feature that tries to be smarter than the user, with no direct way to override it, is a bug. At any rate - if it's not a bug, it's a very annoying feature. ---------------------------------------------------------------------- Martin_fr · 2018-01-10 11:22 Its probably meant to be a feature, but it is strange. The idea seems to be, that the code is edited (button added to form declaration), therefore the editor switches to that unit. (Other edits - such as resizing a button - do not switch) But, if the feature means to switch to the source that it changed, then it is incomplete. It does not scroll the editor to the changed line. So it shows some random code in that unit.