selection: use selection_start() to initialize word/row-based selection

This removes the selection_mark_word() and selection_mark_row()
functions. To start a word/row-based selection, use selection_start()
with SELECTION_SEMANTIC_{WORD,ROW}
This commit is contained in:
Daniel Eklöf 2021-01-02 23:00:54 +01:00
parent 3dd6b7e4ef
commit 3afc5a723e
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
4 changed files with 104 additions and 107 deletions

View file

@ -11,7 +11,8 @@ extern const struct zwp_primary_selection_device_v1_listener primary_selection_d
bool selection_enabled(const struct terminal *term, struct seat *seat);
void selection_start(
struct terminal *term, int col, int row,
enum selection_kind kind, enum selection_semantic semantic);
enum selection_kind kind, enum selection_semantic semantic,
bool spaces_only);
void selection_update(struct terminal *term, int col, int row);
void selection_finalize(
struct seat *seat, struct terminal *term, uint32_t serial);
@ -25,12 +26,6 @@ bool selection_on_rows(const struct terminal *term, int start, int end);
void selection_view_up(struct terminal *term, int new_view);
void selection_view_down(struct terminal *term, int new_view);
void selection_mark_word(
struct seat *seat, struct terminal *term, int col, int row,
bool spaces_only, uint32_t serial);
void selection_mark_row(
struct seat *seat, struct terminal *term, int row, uint32_t serial);
void selection_clipboard_unset(struct seat *seat);
void selection_primary_unset(struct seat *seat);