fix(projects): normalize item.text for correct Windows support (#2275)

## Description
`Snacks.picker.projects` would not show correctly projects on Windows.
`item.text` was something like
`C:\Users\my_user\AppData\Local\nvim-data\lazy\LazyVim\.git\`.

By normalizing `item.text` it shows correctly the projects.
<!-- Describe the big picture of your changes to communicate to the
maintainers
  why we should accept this pull request. -->

## Related Issue(s)
None
<!--
  If this PR fixes any issues, please link to the issue here.
  - Fixes #<issue_number>
-->

## Screenshots

<!-- Add screenshots of the changes if applicable. -->
This commit is contained in:
Iordanis Petkakis 2025-10-17 22:16:24 +03:00 committed by GitHub
parent 4d261c207f
commit 457596be6d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -110,7 +110,7 @@ function M.projects(opts, ctx)
---@async
proc(function(item)
local path = item.text
local path = svim.fs.normalize(item.text)
path = path:sub(-1) == "/" and path:sub(1, -2) or path
path = vim.fs.dirname(path)
if ctx.filter:match({ file = path, text = path }) then