aboutsummaryrefslogtreecommitdiff
path: root/input.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2021-01-04 19:27:57 +0000
committerDaniel Eklöf <daniel@ekloef.se>2021-01-04 19:27:57 +0000
commitfcca3d3e55da97e0f5298343cb3cc8fef73223cd (patch)
tree97196e44524beea32b53487f31d8ef32e82551aa /input.c
parentrender: codespell: accomodate -> accommodate (diff)
parentextract: finish: increase ‘idx’ when pushing new data, for consistency (diff)
Merge branch 'extend-selection-by-word'
Closes #267
Diffstat (limited to 'input.c')
-rw-r--r--input.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/input.c b/input.c
index e4a1f306..d046bb4a 100644
--- a/input.c
+++ b/input.c
@@ -275,7 +275,8 @@ execute_binding(struct seat *seat, struct terminal *term,
case BIND_ACTION_SELECT_BEGIN:
if (selection_enabled(term, seat) && cursor_is_on_grid) {
selection_start(
- term, seat->mouse.col, seat->mouse.row, SELECTION_NORMAL);
+ term, seat->mouse.col, seat->mouse.row,
+ SELECTION_NORMAL, SELECTION_SEMANTIC_NONE, false);
return true;
}
return false;
@@ -283,7 +284,8 @@ execute_binding(struct seat *seat, struct terminal *term,
case BIND_ACTION_SELECT_BEGIN_BLOCK:
if (selection_enabled(term, seat) && cursor_is_on_grid) {
selection_start(
- term, seat->mouse.col, seat->mouse.row, SELECTION_BLOCK);
+ term, seat->mouse.col, seat->mouse.row,
+ SELECTION_BLOCK, SELECTION_SEMANTIC_NONE, false);
return true;
}
return false;
@@ -298,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;