From 44485a918bd6b5200bc7b3c267c7a953ebc83df9 Mon Sep 17 00:00:00 2001 From: Oleksandr Smirnov Date: Wed, 19 Mar 2025 18:01:17 +0200 Subject: [PATCH] refactor(struct_tags): optimization ig --- lua/gopher/struct_tags.lua | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lua/gopher/struct_tags.lua b/lua/gopher/struct_tags.lua index b0ddcaa..96a4cff 100644 --- a/lua/gopher/struct_tags.lua +++ b/lua/gopher/struct_tags.lua @@ -81,12 +81,10 @@ end ---@param args string[] ---@return string local function handler_user_args(args) - local res = table.concat(args, ",") - if res == "" then + if #args == 0 then return c.gotag.default_tag end - - return res + return table.concat(args, ",") end ---Adds tags to a struct under the cursor