From 5b78c367b9cf45c1f32c30ec2e6783fc4c380e63 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Wed, 12 Dec 2018 14:54:11 +0000 Subject: [PATCH] [Feature] Settings: Allow multiple selectors --- src/plugins/lua/settings.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/plugins/lua/settings.lua b/src/plugins/lua/settings.lua index 03f042fc1f..62fd63ec7d 100644 --- a/src/plugins/lua/settings.lua +++ b/src/plugins/lua/settings.lua @@ -356,7 +356,7 @@ local function check_settings(task) end if rule.selector then - res = rule.selector(task) + res = fun.all(function(s) return s(task) end, rule.selector) if res then matched[#matched + 1] = 'selector' @@ -656,7 +656,11 @@ local function process_settings_table(tbl) end if sel then - out['selector'] = sel + if out.selector then + table.insert(out['selector'], sel) + else + out['selector'] = {sel} + end end end -- 2.47.3