From 84416b130b2683b209d2706753e30bc2fe57a47f Mon Sep 17 00:00:00 2001 From: Jean-Patrick Guerrero Date: Wed, 1 Feb 2023 04:17:03 +0100 Subject: [PATCH] Minor cleaning --- init.lua | 2 +- src/api.lua | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/init.lua b/init.lua index e03c461..704c984 100644 --- a/init.lua +++ b/init.lua @@ -24,7 +24,7 @@ i3 = { data = core.deserialize(storage:get_string"data") or {}, settings = { - debug_mode = true, + debug_mode = false, max_favs = 6, max_waypoints = 30, min_fs_version = 6, diff --git a/src/api.lua b/src/api.lua index b70907d..bb03b26 100644 --- a/src/api.lua +++ b/src/api.lua @@ -205,7 +205,7 @@ function i3.remove_tab(name) return err "i3.remove_tab: tab name missing" end - for i = #i3.tabs, 1, -1 do + for i = #i3.tabs, 2, -1 do local def = i3.tabs[i] if def and name == def.name then remove(i3.tabs, i) @@ -448,11 +448,9 @@ end function i3.remove_minitab(name) if not true_str(name) then return err "i3.remove_minitab: name missing" - elseif name == "all" then - return err "i3.remove_minitab: removing the 'All' tab is not allowed" end - for i = #i3.minitabs, 1, -1 do + for i = #i3.minitabs, 2, -1 do local v = i3.minitabs[i] if v and v.name == name then remove(i3.minitabs, i)