mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-04 01:40:21 -05:00
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:
parent
3dd6b7e4ef
commit
3afc5a723e
4 changed files with 104 additions and 107 deletions
17
input.c
17
input.c
|
|
@ -276,7 +276,7 @@ execute_binding(struct seat *seat, struct terminal *term,
|
|||
if (selection_enabled(term, seat) && cursor_is_on_grid) {
|
||||
selection_start(
|
||||
term, seat->mouse.col, seat->mouse.row,
|
||||
SELECTION_NORMAL, SELECTION_SEMANTIC_NONE);
|
||||
SELECTION_NORMAL, SELECTION_SEMANTIC_NONE, false);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
@ -285,7 +285,7 @@ execute_binding(struct seat *seat, struct terminal *term,
|
|||
if (selection_enabled(term, seat) && cursor_is_on_grid) {
|
||||
selection_start(
|
||||
term, seat->mouse.col, seat->mouse.row,
|
||||
SELECTION_BLOCK, SELECTION_SEMANTIC_NONE);
|
||||
SELECTION_BLOCK, SELECTION_SEMANTIC_NONE, false);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
@ -300,23 +300,26 @@ execute_binding(struct seat *seat, struct terminal *term,
|
|||
|
||||
case BIND_ACTION_SELECT_WORD:
|
||||
if (selection_enabled(term, seat) && cursor_is_on_grid) {
|
||||
selection_mark_word(
|
||||
seat, term, seat->mouse.col, seat->mouse.row, false, serial);
|
||||
selection_start(
|
||||
term, seat->mouse.col, seat->mouse.row,
|
||||
SELECTION_NORMAL, SELECTION_SEMANTIC_WORD, false);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
case BIND_ACTION_SELECT_WORD_WS:
|
||||
if (selection_enabled(term, seat) && cursor_is_on_grid) {
|
||||
selection_mark_word(
|
||||
seat, term, seat->mouse.col, seat->mouse.row, true, serial);
|
||||
selection_start(
|
||||
term, seat->mouse.col, seat->mouse.row,
|
||||
SELECTION_NORMAL, SELECTION_SEMANTIC_WORD, true);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
case BIND_ACTION_SELECT_ROW:
|
||||
if (selection_enabled(term, seat) && cursor_is_on_grid) {
|
||||
selection_mark_row(seat, term, seat->mouse.row, serial);
|
||||
selection_start(term, seat->mouse.col, seat->mouse.row,
|
||||
SELECTION_NORMAL, SELECTION_SEMANTIC_ROW, false);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue