selection: track selection type; normal or block selection

This commit is contained in:
Daniel Eklöf 2020-01-03 23:29:45 +01:00
parent 1178a7763b
commit d706e68280
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
5 changed files with 18 additions and 7 deletions

View file

@ -581,7 +581,9 @@ wl_pointer_button(void *data, struct wl_pointer *wl_pointer,
if (button == BTN_LEFT) {
switch (wayl->mouse.count) {
case 1:
selection_start(term, wayl->mouse.col, wayl->mouse.row);
selection_start(
term, wayl->mouse.col, wayl->mouse.row,
wayl->kbd.ctrl ? SELECTION_BLOCK : SELECTION_NORMAL);
break;
case 2: