Skip to content

feature request - add api to enumerate plugin(s) events #6138

@badrelmers

Description

@badrelmers

CudaText have already a big numbers of plugins, this will for sure make some CudaText parts slower when user install a lot of plugins, currently it is difficult to debug the current live events. I m suffering of some strange hangs of 1s, or slow caret movement...etc and other similar problems that do not happen with a clean cudatext with no plugins.
chrome browser offer a similar function called getEventListeners which is very useful for debugging and understanding how events are handled

is it possible to add a similar thing that show the current active events, and preferably to which plugin they are attached?

another use case is when we set an event with app_proc(PROC_SET_EVENTS it resets all the events, so we have to set the events again, so we read install.inf and set those events, but if the plugin subscribes to events dynamically with app_proc(PROC_SET_EVENTS then it would be very useful to have a way to know which ones are active so we can resubscribe to them again easily.

i hope we can have

  • app_proc(PROC_GET_EVENTS, "cuda_myplugin") returns events of a specific plugin called cuda_myplugin
  • app_proc(PROC_GET_EVENTS_ALL...) returns events of all the plugins as : plugin1:event1,event2...etc and plugin2:event1,event2...etc ...etc

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions