get_selection
Detect whether a selection exists before editing and return its bounds, pixel area, and selected-region map to prevent unintended changes.
Instructions
Describe the current selection: whether there is one, and what it covers.
Returns `bounds`, the pixel `area` actually inside the selection, and a `map` of
the selected region using `#` for selected and `.` for not, in the same shape
`get_pixels(format="map")` uses. The map is capped, and omitted for a selection
larger than the cap, since a wall of characters is not feedback.
Worth calling before a large edit: a selection you forgot about is the difference
between changing what you meant and changing a corner of it.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filename | Yes |