From 866bc33bc948a8f2fbd40686d57ed9b55fa13b90 Mon Sep 17 00:00:00 2001 From: Shougo Matsushita Date: Sat, 3 Feb 2024 14:55:02 +0900 Subject: [PATCH] Check merged flag --- denops/dpp/dpp.ts | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/denops/dpp/dpp.ts b/denops/dpp/dpp.ts index ec359db..4a15d6c 100644 --- a/denops/dpp/dpp.ts +++ b/denops/dpp/dpp.ts @@ -202,13 +202,16 @@ export class Dpp { return; } - plugin.sourced = true; - rtps.splice(runtimeIndex, 0, plugin.rtp); + if (!plugin.merged) { + rtps.splice(runtimeIndex, 0, plugin.rtp); - const afterDir = `${plugin.rtp}/after`; - if (await isDirectory(afterDir)) { - rtps.splice(rtps.indexOf(runtimePath) + 1, 0, afterDir); + const afterDir = `${plugin.rtp}/after`; + if (await isDirectory(afterDir)) { + rtps.splice(rtps.indexOf(runtimePath) + 1, 0, afterDir); + } } + + plugin.sourced = true; }; // Check plugin-option-if is enabled