Condition contracts
Development reference · View source
| Condition | Meaning | Applicable buffer types |
|---|---|---|
selection-has-text | At least one range has different anchor and head offsets; a caret is false | Buffer types with ordinary text selections, including generated buffer types and terminal review; excludes media, directory-tree and UI owners |
multiple-selections | Two or more selection ranges | Buffer types with ordinary text selections, including generated buffer types and terminal review; excludes media, directory-tree and UI owners |
register-empty | Pending selected register has no text or directory entries; after consumption, tests the unnamed register | Everywhere programs execute; excludes UI owners |
read-only | The active buffer type’s text cannot be edited, including terminal and media surfaces | Everywhere programs execute; excludes UI owners |
{mode: <name>} | Role membership for normal/select/insert/replace; exact named mode otherwise | Everywhere programs execute; excludes UI owners |
{buffer-type: <type>} | Exact buffer-types key; unknown names are rejected | Everywhere programs execute; excludes UI owners |
recording-macro | A macro is currently being recorded | Everywhere programs execute; excludes UI owners |
tree-entry-expanded | The selected tree entry is expanded | directory-tree |
tree-entry-is-directory | The selected tree entry is a directory | directory-tree |
tree-entry-is-root | The selected tree entry is the tree root | directory-tree |