[Lazarus] Getting notified when active editor changes

Michael Van Canneyt michael at freepascal.org
Sat Aug 3 15:11:48 CEST 2024



On Sat, 3 Aug 2024, Martin Frb via lazarus wrote:

> On 03/08/2024 10:41, Michael Van Canneyt via lazarus wrote:
>>
>> Hi,
>>
>> I'm trying to improve the "file browser" plugin.
>>
>> I would like to keep it in sync with the currently active editor:
>> In the file/directory tree, always select the directory/file of the 
>> currently
>> active editor. (if it is in the tree, of course)
>
> unit SrcEditorIntf;
>
>   TSemChangeReason = (
>     semEditorActivate,  // Editor is ActiveEditor

Thanks, that is just what I needed.

>
> not sure you may additionally need to watch for new created....

Better not, since it does not yet have a filename, so nothing to show yet.

I implemented an initial version of this new feature, I pushed it to the git repo.

Thanks for the tip...

Michael.


More information about the lazarus mailing list