history improvements: backspace passthrough, hint rearranged

This commit is contained in:
2024-09-06 21:34:29 +00:00
parent fb700c91cf
commit b9b1226e60
2 changed files with 18 additions and 14 deletions

6
ambient.d.ts vendored
View File

@@ -350,6 +350,8 @@ interface Utils {
complete_do(this: Optional<ICommand, 'Tag'>): undefined
replace_me(_match: string, _offset: number, whole: string): string
scroll(): true
get scrolled(): boolean
rescroll(func: (_: undefined) => unknown): true
}
interface Complete {
@@ -448,7 +450,7 @@ interface InputHistory {
/**
* Specific key handlers.
*/
key: Record<string, (textarea: HTMLTextAreaElement) => true>
key: Record<string, (event: KeyboardEvent, textarea: HTMLTextAreaElement) => true>
/**
* Set or unset the readonly mode on the input.
@@ -463,7 +465,7 @@ interface InputHistory {
/**
* Exit the history mode and proc the key event.
*/
exit(textarea: HTMLTextAreaElement, key: KeyboardEvent['key']): true
exit(textarea: HTMLTextAreaElement, e: KeyboardEvent): true
}
// FIXME spread around readonly where appropriate