Skip to content

Commit

Permalink
Call columns after filters
Browse files Browse the repository at this point in the history
  • Loading branch information
Shougo committed Jan 4, 2024
1 parent dcaa48b commit ee729b0
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions denops/ddu/ddu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1258,13 +1258,9 @@ export class Ddu {
parent,
)
) {
await this.#callColumns(
denops,
sourceOptions.columns,
[parent].concat(newItems),
);
children = children.concat(newItems);
}

if (this.shouldStopCurrentContext()) {
return;
}
Expand All @@ -1280,6 +1276,12 @@ export class Ddu {
this.#input,
children,
);

await this.#callColumns(
denops,
sourceOptions.columns,
children,
);
} finally {
// Restore path
this.#context.path = savePath;
Expand Down Expand Up @@ -1411,6 +1413,7 @@ export class Ddu {

this.#setUnexpanded(convertTreePath(item.treePath));
item.__expanded = false;

await this.#callColumns(denops, sourceOptions.columns, [item]);

await ui.collapseItem({
Expand Down Expand Up @@ -1806,9 +1809,6 @@ export class Ddu {
let items = structuredClone(state.items);
const allItems = items.length;

// NOTE: Call columns before filters
await this.#callColumns(denops, sourceOptions.columns, items);

items = await this.#callFilters(
denops,
sourceOptions,
Expand All @@ -1830,6 +1830,9 @@ export class Ddu {
items,
);

// NOTE: Call columns after filters
await this.#callColumns(denops, sourceOptions.columns, items);

return [state.done, allItems, items];
}

Expand Down

0 comments on commit ee729b0

Please sign in to comment.