|
|
@@ -6,6 +6,8 @@ import { createMemo, createResource, createEffect, onMount, onCleanup, Index, Sh
|
|
|
import { createStore } from "solid-js/store"
|
|
|
import { useSDK } from "@tui/context/sdk"
|
|
|
import { useSync } from "@tui/context/sync"
|
|
|
+import { getScrollAcceleration } from "../../util/scroll"
|
|
|
+import { useTuiConfig } from "../../context/tui-config"
|
|
|
import { useTheme, selectedForeground } from "@tui/context/theme"
|
|
|
import { SplitBorder } from "@tui/component/border"
|
|
|
import { useCommandDialog } from "@tui/component/dialog-command"
|
|
|
@@ -81,6 +83,7 @@ export function Autocomplete(props: {
|
|
|
const { theme } = useTheme()
|
|
|
const dimensions = useTerminalDimensions()
|
|
|
const frecency = useFrecency()
|
|
|
+ const tuiConfig = useTuiConfig()
|
|
|
|
|
|
const [store, setStore] = createStore({
|
|
|
index: 0,
|
|
|
@@ -605,6 +608,7 @@ export function Autocomplete(props: {
|
|
|
})
|
|
|
|
|
|
let scroll: ScrollBoxRenderable
|
|
|
+ const scrollAcceleration = createMemo(() => getScrollAcceleration(tuiConfig))
|
|
|
|
|
|
return (
|
|
|
<box
|
|
|
@@ -622,6 +626,7 @@ export function Autocomplete(props: {
|
|
|
backgroundColor={theme.backgroundMenu}
|
|
|
height={height()}
|
|
|
scrollbarOptions={{ visible: false }}
|
|
|
+ scrollAcceleration={scrollAcceleration()}
|
|
|
>
|
|
|
<Index
|
|
|
each={options()}
|