From 037f2c36412a5b82d972557fbd4d4566732a1436 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Simon=20D=C3=A9saulniers?= Date: Tue, 12 Feb 2019 17:27:39 -0500 Subject: [PATCH] util/menu_iterator: unpack retro compatibility * Lua 5.2 renamed `unpack` to `table.unpack`. * Fix: helpers.lua required. --- helpers.lua | 3 ++- util/menu_iterator.lua | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/helpers.lua b/helpers.lua index 4d75f7b..d3fa259 100644 --- a/helpers.lua +++ b/helpers.lua @@ -12,7 +12,8 @@ local io = { lines = io.lines, open = io.open } local pairs = pairs local rawget = rawget -local table = { sort = table.sort } +local table = { sort = table.sort, unpack = table.unpack } +local unpack = unpack or table.unpack -- lua 5.1 retro-compatibility -- Lain helper functions for internal use -- lain.helpers diff --git a/util/menu_iterator.lua b/util/menu_iterator.lua index 0ea4e0e..9959b25 100644 --- a/util/menu_iterator.lua +++ b/util/menu_iterator.lua @@ -11,12 +11,13 @@ -- lain.util.menu_iterator local naughty = require("naughty") +local helpers = require("lain.helpers") local util = require("lain.util") local atable = require("awful.util").table local assert = assert local pairs = pairs local tconcat = table.concat -local unpack = unpack +local unpack = unpack or table.unpack -- lua 5.1 retro-compatibility local state = { cid = nil } -- 2.39.5