aboutsummaryrefslogtreecommitdiff
path: root/input.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2021-01-14 15:30:01 +0000
committerDaniel Eklöf <daniel@ekloef.se>2021-01-14 15:30:01 +0000
commitb25b8a78a98d72d762c649df6a80adb355c246d5 (patch)
tree6c79ade4d1100b0d6d14eaff0c89145320f3996a /input.c
parentMerge branch 'sixel-current-geometry-response' (diff)
parentconfig: add ‘select-extend-character-wise’ bind action (diff)
Merge branch 'selection-extend-force-character-wise'
Closes #258
Diffstat (limited to 'input.c')
-rw-r--r--input.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/input.c b/input.c
index 3e8019e8..33127afd 100644
--- a/input.c
+++ b/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;