Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
epwalsh authored Jun 17, 2024
2 parents 434f472 + 89cab28 commit 3141bf1
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Added relative to root markdown links as search pattern for backlinks.

### Fixed

- Searching for notes by file name is case insensitive.

## [v3.7.14](https://github.com/epwalsh/obsidian.nvim/releases/tag/v3.7.14) - 2024-06-04

### Added
Expand Down
8 changes: 7 additions & 1 deletion lua/obsidian/client.lua
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,13 @@ Client._search_iter_async = function(self, term, search_opts, find_opts)
on_exit
)

search.find_async(self.dir, term, self:_prepare_search_opts(find_opts), on_find_match, on_exit)
search.find_async(
self.dir,
term,
self:_prepare_search_opts(find_opts, { ignore_case = true }),
on_find_match,
on_exit
)

return function()
while cmds_done < 2 do
Expand Down
4 changes: 4 additions & 0 deletions lua/obsidian/search.lua
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,10 @@ M.build_find_cmd = function(path, term, opts)
additional_opts[#additional_opts + 1] = term
end

if opts.ignore_case then
additional_opts[#additional_opts + 1] = "--glob-case-insensitive"
end

if path ~= nil and path ~= "." then
if opts.escape_path then
path = assert(vim.fn.fnameescape(tostring(path)))
Expand Down

0 comments on commit 3141bf1

Please sign in to comment.