On Monday, September 4, 2023 at 5:01:51 AM UTC-5 Edward K. Ream wrote:

On Sun, Sep 3, 2023 at 7:41 PM Félix wrote:

The *c.doCommandByName* method exists, but it insists on having an event as 
a second parameter. 

...

I discovered that I can make it work by passing a fake event such as : 
{"c": c}, or even a better one: g.app.gui.create_key_event(c),  but this is 
quite unintuitive. Could it not default to a valid default event if the 
event is not passed?

 
PR #3541 <https://github.com/leo-editor/leo-editor/pull/3541> has been 
merged into devel.

k.simulateCommand is deprecated, but will remain for compatibility.

The PR changes k.simulateCommand to c.doCommandByName everywhere, including 
in plugins and unit tests.

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/84e5ace2-c61f-433e-9d30-b653b33a18b8n%40googlegroups.com.

Reply via email to