talonhub / community

Voice command set for Talon, community-supported.
MIT License
622 stars 772 forks source link

file manager shouldn't read registry.tags #1090

Open lunixbochs opened 1 year ago

lunixbochs commented 1 year ago

The registry object is for debug use only, you need to use the scope api e.g. scope.get("tag") if you want the current tags.

https://github.com/knausj85/knausj_talon/blob/b25bac46c6543d0ec5fe2b2d09596444cd903371/tags/file_manager/file_manager.py#L371

Also this function may have a race condition - if we just switched apps/windows, the tag may not change before the window event handler runs.

fatalerrorx commented 1 year ago

registry.lists is also used in quite a few places.

lunixbochs commented 1 year ago

registry.lists: functions_common.py usage seems incorrect libraries_gui.py seems incorrect snippets.py seems incorrect talon_repl.talon seems fine talon_helpers.py seems fine help.py seems fine

The imgui code here that uses registry.lists to find the currently active version of a list and manually read values out of it, should define / call an overridable action instead.