From 794fd5e695035ee91e28bfec8d14b33777ecd18a Mon Sep 17 00:00:00 2001 From: Srinesh Nisala Date: Sun, 17 Dec 2023 02:27:35 +0530 Subject: [PATCH] fix: filter_func is not called (#78) --- lua/window-picker/configurer.lua | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/lua/window-picker/configurer.lua b/lua/window-picker/configurer.lua index 4aecb0c..9a1acd0 100644 --- a/lua/window-picker/configurer.lua +++ b/lua/window-picker/configurer.lua @@ -67,6 +67,19 @@ function M._backward_compatibility_config_changes(config) end function M:config_filter(filter) + if self.config.filter_func then + filter = { + filter_windows = function(_, windows) + return self.config.filter_func( + windows, + self.config.filter_rules + ) + end, + } + + return filter + end + filter:set_config(self.config.filter_rules) return filter end