Skip to content

Commit 23daa63

Browse files
committed
Add cmdline to constructor of InputComponentParams
1 parent e858361 commit 23daa63

1 file changed

Lines changed: 12 additions & 2 deletions

File tree

denops/fall/component/input.ts

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ export type InputComponentParams = ComponentProperties & {
2424
/** The title of the input component */
2525
readonly title?: string;
2626

27+
/** The command line input text */
28+
readonly cmdline?: string;
29+
2730
/** Optional spinner sequence to show during processing */
2831
readonly spinner?: readonly string[];
2932

@@ -77,11 +80,18 @@ export class InputComponent extends BaseComponent {
7780
#modifiedContent = true;
7881

7982
constructor(
80-
{ title, spinner, headSymbol, failSymbol, ...params }:
81-
InputComponentParams = {},
83+
{
84+
title,
85+
cmdline,
86+
spinner,
87+
headSymbol,
88+
failSymbol,
89+
...params
90+
}: InputComponentParams = {},
8291
) {
8392
super(params);
8493
this.#title = title ?? "";
94+
this.#cmdline = cmdline ?? "";
8595
this.#spinner = new Spinner(spinner ?? SPINNER);
8696
this.#headSymbol = headSymbol ?? HEAD_SYMBOL;
8797
this.#failSymbol = failSymbol ?? FAIL_SYMBOL;

0 commit comments

Comments
 (0)