Skip to content

Commit 0bbe837

Browse files
committed
fix: trim extension indicator
1 parent 53fa8d1 commit 0bbe837

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

denops/fall/picker.ts

+7-10
Original file line numberDiff line numberDiff line change
@@ -172,21 +172,18 @@ export class Picker<T extends Detail> implements AsyncDisposable {
172172
const { sorterIndex, sorterCount } = this.#sortProcessor;
173173
const { rendererIndex, rendererCount } = this.#renderProcessor;
174174
const { previewerIndex, previewerCount } = this.#previewProcessor ?? {};
175-
const matcherIndicator = matcherCount > 1
175+
const mi = matcherCount > 1
176176
? `${this.#matcherIcon}${matcherIndex + 1}`
177177
: "";
178-
const sorterIndicator = sorterCount > 1
179-
? `${this.#sorterIcon}${sorterIndex + 1}`
180-
: "";
181-
const rendererIndicator = rendererCount > 1
178+
const si = sorterCount > 1 ? `${this.#sorterIcon}${sorterIndex + 1}` : "";
179+
const ri = rendererCount > 1
182180
? `${this.#rendererIcon}${rendererIndex + 1}`
183181
: "";
184-
const previewerIndicator =
185-
previewerIndex !== undefined && previewerCount !== undefined &&
182+
const pi = previewerIndex !== undefined && previewerCount !== undefined &&
186183
previewerCount > 1
187-
? `${this.#previewerIcon}${previewerIndex + 1}`
188-
: "";
189-
return `${matcherIndicator} ${sorterIndicator} ${rendererIndicator} ${previewerIndicator}`;
184+
? `${this.#previewerIcon}${previewerIndex + 1}`
185+
: "";
186+
return `${mi} ${si} ${ri} ${pi}`.trim();
190187
}
191188

192189
async open(

0 commit comments

Comments
 (0)