Skip to content

Commit 91e89c9

Browse files
committed
fix(filter): fix 'primary' filter
1 parent 171c481 commit 91e89c9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lua/colorbox.lua

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,10 @@ local function _primary_color_name_filter(color_name, spec)
7979
local unique = #spec.color_names <= 1
8080
local shortest = string.len(color_name)
8181
== utils.min(spec.color_names, string.len)
82-
local url_splits =
83-
vim.split(spec.url, "/", { plain = true, trimempty = true })
84-
local matched = url_splits[1]:lower() == color_name:lower()
85-
or url_splits[2]:lower() == color_name:lower()
82+
local handle_splits =
83+
vim.split(spec.handle, "/", { plain = true, trimempty = true })
84+
local matched = handle_splits[1]:lower() == color_name:lower()
85+
or handle_splits[2]:lower() == color_name:lower()
8686
logger.debug(
8787
"|colorbox._primary_color_name_filter| color:%s, spec:%s, unique:%s, shortest: %s, matched:%s",
8888
vim.inspect(color_name),

0 commit comments

Comments
 (0)