Skip to content

Commit

Permalink
Fix refreshItems behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
Shougo committed Jun 2, 2024
1 parent 0f3a22f commit 6143d17
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion denops/ddu/ddu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1133,7 +1133,7 @@ export class Ddu {

await this.refresh(denops);

if (searchPath.length <= 0) {
if (searchPath.length > 0) {
// NOTE: If searchPath exists, expandItems() is executed.
await this.restoreTree(denops);
}
Expand Down Expand Up @@ -1756,6 +1756,10 @@ export class Ddu {
async restoreTree(
denops: Denops,
): Promise<void> {
if (this.#expandedItems.size === 0) {
return;
}

await this.expandItems(
denops,
[...this.#expandedItems.values()].map((item) => ({
Expand Down

0 comments on commit 6143d17

Please sign in to comment.