aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2020-10-11 16:09:30 +0000
committerDaniel Eklöf <daniel@ekloef.se>2020-10-11 16:09:30 +0000
commitdd14e0b3c3005fa79cd6640c65960d6883b2ed2c (patch)
treeb2281bf2759423492dbee94812db183439e46860
parentselection: auto-scroll: selection keeps scrolling while mouse is outside grid (diff)
input: auto-scroll: apply scrollback.multiplier to the interval divisor
-rw-r--r--input.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/input.c b/input.c
index 27009810..b862408b 100644
--- a/input.c
+++ b/input.c
@@ -1341,10 +1341,11 @@ wl_pointer_motion(void *data, struct wl_pointer *wl_pointer,
: y - (term->height - term->margins.bottom);
assert(distance > 0);
- distance /= term->scale;
+ int divisor
+ = distance * term->conf->scrollback.multiplier / term->scale;
selection_start_scroll_timer(
- term, 100000000 / (distance > 0 ? distance : 1),
+ term, 400000000 / (divisor > 0 ? divisor : 1),
scroll_up ? SELECTION_SCROLL_UP : SELECTION_SCROLL_DOWN,
selection_col);
}