Fix incwfact() error with maximized windows

When the window is maximized, calling incwfact() results in an error because `w` is nil, return instead.
This commit is contained in:
Rastislav Barlik 2018-05-26 22:55:14 +01:00 committed by GitHub
parent 4e17cc6bfc
commit 2d39e53ef3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -974,6 +974,8 @@ function client.incwfact(add, c)
local t = c.screen.selected_tag
local w = client.idx(c)
if not w then return end
local data = t.windowfact or {}
local colfact = data[w.col] or {}
local curr = colfact[w.idx] or 1