aboutsummaryrefslogtreecommitdiff
path: root/input.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2021-01-06 09:53:27 +0000
committerDaniel Eklöf <daniel@ekloef.se>2021-01-06 09:53:27 +0000
commit3a9172342fd69c09d3fddfb26eba12dcbe1e5149 (patch)
tree8fc6ff4bb902a56f9148cfa9fba1c454a2c3f2be /input.c
parentMerge branch 'extend-selection-by-word' (diff)
selection: combine enum selection_kind with selection_semantic
Diffstat (limited to 'input.c')
-rw-r--r--input.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/input.c b/input.c
index d046bb4a..3e8019e8 100644
--- a/input.c
+++ b/input.c
@@ -275,8 +275,7 @@ 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, SELECTION_SEMANTIC_NONE, false);
+ term, seat->mouse.col, seat->mouse.row, SELECTION_CHAR_WISE, false);
return true;
}
return false;
@@ -284,8 +283,7 @@ 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, SELECTION_SEMANTIC_NONE, false);
+ term, seat->mouse.col, seat->mouse.row, SELECTION_BLOCK, false);
return true;
}
return false;
@@ -301,8 +299,7 @@ execute_binding(struct seat *seat, struct terminal *term,
case BIND_ACTION_SELECT_WORD:
if (selection_enabled(term, seat) && cursor_is_on_grid) {
selection_start(
- term, seat->mouse.col, seat->mouse.row,
- SELECTION_NORMAL, SELECTION_SEMANTIC_WORD, false);
+ term, seat->mouse.col, seat->mouse.row, SELECTION_WORD_WISE, false);
return true;
}
return false;
@@ -310,16 +307,15 @@ execute_binding(struct seat *seat, struct terminal *term,
case BIND_ACTION_SELECT_WORD_WS:
if (selection_enabled(term, seat) && cursor_is_on_grid) {
selection_start(
- term, seat->mouse.col, seat->mouse.row,
- SELECTION_NORMAL, SELECTION_SEMANTIC_WORD, true);
+ term, seat->mouse.col, seat->mouse.row, SELECTION_WORD_WISE, true);
return true;
}
return false;
case BIND_ACTION_SELECT_ROW:
if (selection_enabled(term, seat) && cursor_is_on_grid) {
- selection_start(term, seat->mouse.col, seat->mouse.row,
- SELECTION_NORMAL, SELECTION_SEMANTIC_ROW, false);
+ selection_start(
+ term, seat->mouse.col, seat->mouse.row, SELECTION_LINE_WISE, false);
return true;
}
return false;