[Github-comments] [geany/geany-plugins] geanypy: Use Python callback return value for keybindings return value (#809)

Colomban Wendling notifications at xxxxx
Fri Apr 19 10:31:17 UTC 2019


@frlan The change here allows a GeanyPy plugin to tell Geany it *did* handle a keybinding, preventing any other handler using the same binding to run.

The problem is kinda tricky in real situation because this feature is more or less broken in Geany, as there's no real way to tell which handler will be called first, so it only works if all handlers on the same binding are well-behaved.

Anyway, to test, for example make a GeanyPy plugin with 2 binding handlers that do something visible (log a message or something). Then, bind those both to the same key combo, and see they both run.  Now, try and follow Geany API to return `True` in the handlers, which should prevent the other ones from running.  Before this patch, both still run.  After, only the first one should (given it returns `True`).

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany-plugins/pull/809#issuecomment-484844904
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20190419/c3cb0241/attachment.html>


More information about the Github-comments mailing list