From 75233279ec8d794110a220ebb55c199a5bb09efe Mon Sep 17 00:00:00 2001 From: ksqsf Date: Thu, 7 Dec 2023 06:58:43 +0800 Subject: [PATCH] fix: aux_translator notifier disconnect --- lua/moran_aux_translator.lua | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lua/moran_aux_translator.lua b/lua/moran_aux_translator.lua index 4daef5f..82c2592 100644 --- a/lua/moran_aux_translator.lua +++ b/lua/moran_aux_translator.lua @@ -45,12 +45,13 @@ function Module.init(env) aux_length = nil end - env.notifier = env.engine.context.select_notifier:connect(on_select_pre, 0) - env.notifier = env.engine.context.select_notifier:connect(on_select_post) + env.notifier_pre = env.engine.context.select_notifier:connect(on_select_pre, 0) + env.notifier_post = env.engine.context.select_notifier:connect(on_select_post) end function Module.fini(env) - env.notifier:disconnect() + env.notifier_pre:disconnect() + env.notifier_post:disconnect() end function Module.func(input, seg, env)