additional keys for history mode
This commit is contained in:
16
ambient.d.ts
vendored
16
ambient.d.ts
vendored
@@ -349,7 +349,7 @@ interface Utils {
|
||||
complete_do_target(actions: {self: unknown, others: unknown}): Set<string>
|
||||
complete_do(this: Optional<ICommand, 'Tag'>): undefined
|
||||
replace_me(_match: string, _offset: number, whole: string): string
|
||||
//pad_chat(chat: HTMLDivElement): undefined
|
||||
scroll(): true
|
||||
}
|
||||
|
||||
interface Complete {
|
||||
@@ -445,15 +445,25 @@ interface InputHistory {
|
||||
*/
|
||||
ids: Set<number> | undefined
|
||||
|
||||
/**
|
||||
* Specific key handlers.
|
||||
*/
|
||||
key: Record<string, (textarea: HTMLTextAreaElement) => true>
|
||||
|
||||
/**
|
||||
* Set or unset the readonly mode on the input.
|
||||
*/
|
||||
icro(textarea: HTMLTextAreaElement, readonly: boolean): true
|
||||
|
||||
/**
|
||||
* Enter the history mode.
|
||||
*/
|
||||
enter(textarea: HTMLTextAreaElement, input: string, bottom: boolean, ids: Set<number>): true
|
||||
|
||||
/**
|
||||
* Exit the history mode and optionally restore original input.
|
||||
* Exit the history mode and proc the key event.
|
||||
*/
|
||||
exit(textarea: HTMLTextAreaElement, restore_input: boolean): true
|
||||
exit(textarea: HTMLTextAreaElement, key: KeyboardEvent['key']): true
|
||||
}
|
||||
|
||||
// FIXME spread around readonly where appropriate
|
||||
|
Reference in New Issue
Block a user