diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2022-04-25 17:59:23 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2022-04-25 17:59:23 +0000 |
| commit | 6316a5eb0cf2b1fe25ca0e9d60c4e11fce9c22d1 (patch) | |
| tree | 2319fb62c409a67e3391f7502e47127f50411f81 /selection.h | |
| parent | grid: add abs-to-sb and sb-to-abs utility function (diff) | |
selection: add start/end coordinate getters
Internally, selection coordinates are *unbounded* (that is, the row
numbers may be larger than grid->num_rows) while a selection is
ongoing. Only after it has been finalized are the coordinates bounded.
This means it isn’t safe to use term->selection.coords.* directly.
Diffstat (limited to 'selection.h')
| -rw-r--r-- | selection.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/selection.h b/selection.h index 295d8d1c..0a6ece91 100644 --- a/selection.h +++ b/selection.h @@ -79,3 +79,6 @@ void selection_find_word_boundary_left( struct terminal *term, struct coord *pos, bool spaces_only); void selection_find_word_boundary_right( struct terminal *term, struct coord *pos, bool spaces_only); + +struct coord selection_get_start(const struct terminal *term); +struct coord selection_get_end(const struct terminal *term); |
