sublime-phpcs icon indicating copy to clipboard operation
sublime-phpcs copied to clipboard

Add on_query_context handler for visible regions

Open srichter opened this issue 4 years ago • 1 comments

This tracks the state of regions added by the plugin and adds a context key for querying that state. It allows someone to set up a conditional keybind to clear the regions, e.g.:

{ "keys": ["escape"], "command": "phpcs_clear_sniffer_marks", "context":
    [
        { "key": "phpcs.regions_visible", "operator": "equal", "operand": true }
    ]
}

srichter avatar Apr 21 '21 09:04 srichter

Thanks for the contribution @srichter

I'm currently not working with PHP, or Sublime, so cannot quickly test this. It may be a while before I can rig this all back up. Apologies.

benmatselby avatar Apr 22 '21 08:04 benmatselby