fix: fix toggle entry mistake

This commit is contained in:
JuanZoran 2023-03-29 09:19:14 +08:00
parent 5b4ec8ea4e
commit f11cee0b5d

View File

@ -133,9 +133,10 @@ function M:wait()
width = opts.width, width = opts.width,
} }
local cur = 0 self.waitting = true
local pr = util.node.prompt local cur = 0
local it = util.node.item local pr = util.node.prompt
local it = util.node.item
return function(backend) return function(backend)
cur = cur + 1 cur = cur + 1
buffer[1] = pr(backend.name_zh) buffer[1] = pr(backend.name_zh)
@ -189,7 +190,7 @@ end
---@param data TransData ---@param data TransData
---@overload fun(result:TransResult) ---@overload fun(result:TransResult)
function M:process(data) function M:process(data)
if self.window and self.window:is_valid() then if not self.waitting and self.window and self.window:is_valid() then
self:execute 'toggle_entry' self:execute 'toggle_entry'
return return
end end