From 6e7a979cb1dc3d04a2f718ff667cd68b4c9c3892 Mon Sep 17 00:00:00 2001 From: Shougo Matsushita Date: Wed, 12 Jul 2023 13:29:33 +0900 Subject: [PATCH] UI visible check for quit action --- denops/ddu/ddu.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/denops/ddu/ddu.ts b/denops/ddu/ddu.ts index 9b2e607..be01c25 100644 --- a/denops/ddu/ddu.ts +++ b/denops/ddu/ddu.ts @@ -922,7 +922,16 @@ export class Ddu { return; } - if (actionOptions.quit) { + const visible = await ui.visible({ + denops, + context: this.context, + options: this.options, + uiOptions, + uiParams, + tabNr: await fn.tabpagenr(denops), + }); + + if (actionOptions.quit && visible) { // NOTE: To quit UI properly, all items must be gathered. if (!this.context.doneUi) { echo(denops, "Current ddu UI is not done");