mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-05 04:06:08 -05:00
config: add ‘select-extend-character-wise’ bind action
This forces the (new) selection mode to be character-wise when extending a word- or line-wise selection. Default key binding is ctrl+RMB.
This commit is contained in:
parent
2e46811953
commit
767bd4f1db
8 changed files with 65 additions and 18 deletions
12
input.c
12
input.c
|
|
@ -291,7 +291,17 @@ execute_binding(struct seat *seat, struct terminal *term,
|
|||
case BIND_ACTION_SELECT_EXTEND:
|
||||
if (selection_enabled(term, seat) && cursor_is_on_grid) {
|
||||
selection_extend(
|
||||
seat, term, seat->mouse.col, seat->mouse.row, serial);
|
||||
seat, term, seat->mouse.col, seat->mouse.row, term->selection.kind);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
case BIND_ACTION_SELECT_EXTEND_CHAR_WISE:
|
||||
if (selection_enabled(term, seat) && cursor_is_on_grid &&
|
||||
term->selection.kind != SELECTION_BLOCK)
|
||||
{
|
||||
selection_extend(
|
||||
seat, term, seat->mouse.col, seat->mouse.row, SELECTION_CHAR_WISE);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue