From b44ab4bf2e69ac45f9e73ea4d06781a2d2e35132 Mon Sep 17 00:00:00 2001 From: JuanZoran <1430359574@qq.com> Date: Thu, 23 Mar 2023 09:52:44 +0800 Subject: [PATCH] refactor: rewrite TransNode and use main_loop in process instead of buffer function --- lua/Trans/util/node.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lua/Trans/util/node.lua b/lua/Trans/util/node.lua index a3573a4..73626b0 100644 --- a/lua/Trans/util/node.lua +++ b/lua/Trans/util/node.lua @@ -29,7 +29,7 @@ local text_meta = { render = function(self, buffer, line, col) local nodes = self.nodes local step = self.step - local len = step and #step or 0 + local len = step and #step or 0 for _, node in ipairs(nodes) do node:render(buffer, line, col) @@ -73,7 +73,6 @@ local function format(args) wid = wid + args[i][1]:width() end - local space = math.max(math.floor((width - wid) / (size - 1)), 0) args.step = spin:rep(space) args.width = nil