We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 31557c6 commit a324509Copy full SHA for a324509
1 file changed
cli/src/utils/chat-scroll-accel.ts
@@ -1,4 +1,5 @@
1
import { Queue } from './arrays'
2
+import { clamp } from './math'
3
4
import type { ScrollAcceleration } from '@opentui/core'
5
@@ -105,8 +106,9 @@ export class QuadraticScrollAccel implements ScrollAcceleration {
105
106
oldestTick = this.tickHistory.peek() ?? now
107
}
108
- return Math.min(
109
+ return clamp(
110
Math.round(this.tickHistory.length * this.multiplier),
111
+ 1,
112
this.maxRows,
113
)
114
0 commit comments