awful.layout.inc: Hide API breakage
In commit 3cbdc2a79f
, the argument order for awful.layout.inc was changed
from (layouts, i, s) to (i, s, layouts), so that layouts can become an optional
parameter. However, this change (obviously) breaks user configs.
To hide this breakage, we assume the old argument order if the number i is a
table. This cannot break anything, since the operator "+" will error out on
tables anyway. :-)
Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
9555c2d4a6
commit
5cf13dba6b
|
@ -67,6 +67,11 @@ end
|
|||
-- @param s The screen number.
|
||||
-- @param[opt] layouts A table of layouts.
|
||||
function layout.inc(i, s, layouts)
|
||||
if type(i) == "table" then
|
||||
-- Older versions of this function had arguments (layouts, i, s), but
|
||||
-- this was changed so that 'layouts' can be an optional parameter
|
||||
layouts, i, s = i, s, layouts
|
||||
end
|
||||
local t = tag.selected(s)
|
||||
local layouts = layouts or layout.layouts
|
||||
if t then
|
||||
|
|
Loading…
Reference in New Issue