mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-04 04:06:06 -05:00
selection: add selection_extend()
This function extends an existing selection in the following way: If the extension point is *before* the upper boundary of the current selection, extend the selection upwards. If the extension point is *after* the bottom boundary of the current selection, extend the selection downwards. If the extension point is *inside* the current selection, shrink the selection such that the new size is maximized. This means we move the *closest* start/end point from in the current selection.
This commit is contained in:
parent
2344f153d9
commit
aa01521ff6
2 changed files with 172 additions and 14 deletions
|
|
@ -14,6 +14,7 @@ void selection_start(
|
|||
void selection_update(struct terminal *term, int col, int row);
|
||||
void selection_finalize(struct terminal *term, uint32_t serial);
|
||||
void selection_cancel(struct terminal *term);
|
||||
void selection_extend(struct terminal *term, int col, int row, uint32_t serial);
|
||||
|
||||
bool selection_on_row_in_view(const struct terminal *term, int row_no);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue