c.to_selected_tags(): Handle screenless clients

Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
Uli Schlachter 2016-04-25 21:12:10 +02:00
parent 8ca65cbc26
commit ac81a8df1f
1 changed files with 7 additions and 5 deletions

View File

@ -446,6 +446,7 @@ function client.object.to_selected_tags(self)
end end
end end
if self.screen then
if #tags == 0 then if #tags == 0 then
tags = self.screen.selected_tags tags = self.screen.selected_tags
end end
@ -453,6 +454,7 @@ function client.object.to_selected_tags(self)
if #tags == 0 then if #tags == 0 then
tags = self.screen.tags tags = self.screen.tags
end end
end
if #tags ~= 0 then if #tags ~= 0 then
self:tags(tags) self:tags(tags)