Skip to content

Commit

Permalink
Don't resolve duplicate paths
Browse files Browse the repository at this point in the history
  • Loading branch information
epwalsh committed Apr 1, 2024
1 parent 2516df4 commit 30a7d7b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lua/obsidian/client.lua
Original file line number Diff line number Diff line change
Expand Up @@ -383,17 +383,17 @@ Client._search_iter_async = function(self, term, search_opts, find_opts)
---@param content_match MatchData
local function on_search_match(content_match)
local path = Path.new(content_match.path.text):resolve { strict = true }
if not found[path] then
found[path] = true
if not found[path.filename] then
found[path.filename] = true
tx.send(path)
end
end

---@param path_match string
local function on_find_match(path_match)
local path = Path.new(path_match):resolve { strict = true }
if not found[path] then
found[path] = true
if not found[path.filename] then
found[path.filename] = true
tx.send(path)
end
end
Expand Down

0 comments on commit 30a7d7b

Please sign in to comment.