diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2021-01-06 10:11:46 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2021-01-14 15:29:29 +0000 |
| commit | 767bd4f1dbbb14d9d28acb22cf42a91e6305a69a (patch) | |
| tree | 6c79ade4d1100b0d6d14eaff0c89145320f3996a /input.c | |
| parent | Merge branch 'sixel-current-geometry-response' (diff) | |
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.
Diffstat (limited to 'input.c')
| -rw-r--r-- | input.c | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -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; |
