chore: uptick
This commit is contained in:
@@ -1,22 +0,0 @@
|
||||
import { Box, Text } from 'ink'
|
||||
|
||||
import type { Theme } from '../theme.js'
|
||||
|
||||
export function CommandPalette({ matches, t }: { matches: [string, string][]; t: Theme }) {
|
||||
if (!matches.length) {
|
||||
return null
|
||||
}
|
||||
|
||||
return (
|
||||
<Box borderColor={t.color.bronze} borderStyle="single" flexDirection="column" paddingX={1}>
|
||||
{matches.map(([cmd, desc], i) => (
|
||||
<Text key={`${i}-${cmd}`}>
|
||||
<Text bold color={t.color.amber}>
|
||||
{cmd}
|
||||
</Text>
|
||||
{desc ? <Text color={t.color.dim}> — {desc}</Text> : null}
|
||||
</Text>
|
||||
))}
|
||||
</Box>
|
||||
)
|
||||
}
|
||||
@@ -116,6 +116,7 @@ export function TextInput({ value, onChange, onSubmit, onLargePaste, placeholder
|
||||
|
||||
let c = cur,
|
||||
v = value
|
||||
|
||||
const mod = k.ctrl || k.meta
|
||||
|
||||
if (k.home || (k.ctrl && inp === 'a')) {
|
||||
@@ -161,11 +162,13 @@ export function TextInput({ value, onChange, onSubmit, onLargePaste, placeholder
|
||||
if (!pasteBuf.current) {
|
||||
pastePos.current = c
|
||||
}
|
||||
|
||||
pasteBuf.current += raw
|
||||
|
||||
if (pasteTimer.current) {
|
||||
clearTimeout(pasteTimer.current)
|
||||
}
|
||||
|
||||
pasteTimer.current = setTimeout(flushPaste, 50)
|
||||
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user