From ce59bd35d4ea306a527f71d59a4c7b1727f11b4f Mon Sep 17 00:00:00 2001 From: Jean-Patrick Guerrero Date: Mon, 31 Aug 2020 15:07:39 +0200 Subject: [PATCH] Fix tooltip --- init.lua | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/init.lua b/init.lua index c307818..ea2696d 100644 --- a/init.lua +++ b/init.lua @@ -830,10 +830,6 @@ local function strip_newline(str) return match(str, "[^\n]*") end -local function strip_prefix(str) - return match(str, ".*@.*%)(.*)()") or str -end - local function get_desc(item) if sub(item, 1, 1) == "_" then item = sub(item, 2) @@ -846,7 +842,6 @@ local function get_desc(item) if true_str(desc) then desc = desc:trim() desc = strip_newline(desc) - desc = strip_prefix(desc) if not find(desc, "%u") then desc = toupper(desc) @@ -1109,13 +1104,7 @@ local function get_grid_fs(fs, rcp, spacing) fs[#fs + 1] = fmt(FMT.image, X, Y, btn_size, btn_size, PNG.selected) end - local btn_name = "" - - if groups then - btn_name = fmt("group|%s|%s", groups[1], item) - elseif item ~= "" then - btn_name = item - end + local btn_name = groups and fmt("group|%s|%s", groups[1], item) or item fs[#fs + 1] = fmt(FMT.item_image_button, X, Y, btn_size, btn_size, item, btn_name, label)