feat: execute toggle_entry if translate'string' window is available

This commit is contained in:
JuanZoran
2023-03-28 20:55:49 +08:00
parent 2246968d90
commit 5b4ec8ea4e
3 changed files with 13 additions and 326 deletions

View File

@@ -189,7 +189,10 @@ end
---@param data TransData
---@overload fun(result:TransResult)
function M:process(data)
if self.pin then return end
if self.window and self.window:is_valid() then
self:execute 'toggle_entry'
return
end
local result, name = data:get_available_result()
if not result then