Skip to content

Commit cd1fd63

Browse files
committed
fix: ensure initial matching when -input= option is provided
The previous implementation set initialQuery to #previousQuery, which prevented the first matching from executing when an initial query was provided via the -input= option. This fix ensures the first matching always runs by keeping #previousQuery undefined on initialization.
1 parent abfe3b7 commit cd1fd63

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

denops/fall/processor/match.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,9 @@ export class MatchProcessor<T extends Detail> implements Disposable {
5050
this.#chunkInterval = options.chunkInterval ?? CHUNK_INTERVAL;
5151
this.#incremental = options.incremental ?? false;
5252
this.#items = options.initialItems?.slice() ?? [];
53-
this.#previousQuery = options.initialQuery;
53+
// Do not set initialQuery to #previousQuery to ensure the first matching
54+
// is executed when the initial query is provided via -input= option.
55+
this.#previousQuery = undefined;
5456
}
5557

5658
get #matcher(): Matcher<T> {

0 commit comments

Comments
 (0)