From 887bdeaabc1899370895fc28cc2f1ad03b853486 Mon Sep 17 00:00:00 2001 From: Shougo Matsushita Date: Fri, 29 Sep 2023 19:09:05 +0900 Subject: [PATCH] Fix sourceOptions overwrite https://github.com/Shougo/ddu-ui-filer/issues/32 --- denops/ddu/app.ts | 1 + denops/ddu/ddu.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/denops/ddu/app.ts b/denops/ddu/app.ts index 3565c9b..df54bc9 100644 --- a/denops/ddu/app.ts +++ b/denops/ddu/app.ts @@ -260,6 +260,7 @@ export function main(denops: Denops) { if (opt?.updateOptions) { const updateOptions = opt.updateOptions; + if ( (updateOptions.ui && updateOptions.ui !== ddu.getOptions().ui) || (updateOptions.uiOptions !== ddu.getOptions().uiOptions) || diff --git a/denops/ddu/ddu.ts b/denops/ddu/ddu.ts index 89bf387..2822ba9 100644 --- a/denops/ddu/ddu.ts +++ b/denops/ddu/ddu.ts @@ -1122,7 +1122,7 @@ export class Ddu { itemAction.userSource = convertUserString(itemAction.userSource); // Overwrite current path if (!itemAction.userSource.options) { - itemAction.userSource.options = itemAction.sourceOptions; + itemAction.userSource.options = {}; } itemAction.userSource.options.path = itemAction.sourceOptions.path; if (this.context.path.length > 0) {