Skip to content

Commit

Permalink
Merge pull request #420 from sim590/unpack-lua51-compat
Browse files Browse the repository at this point in the history
util/menu_iterator: retro compatibility with lua 5.1
  • Loading branch information
lcpz committed Feb 14, 2019
2 parents 93b31ef + 037f2c3 commit 013654c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion helpers.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion util/menu_iterator.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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 }

Expand Down

0 comments on commit 013654c

Please sign in to comment.