danielfalk / smart-open.nvim

Neovim plugin for fast file-finding
MIT License
498 stars 25 forks source link

fix: consistent path separator on windows #76

Open scottmckendry opened 3 months ago

scottmckendry commented 3 months ago

Resolves #70

When debugging this error, I noticed that paths are being indexed with both / and \ separators. This was causing the nil value error in virtual_name.lua because it expects either one or the other.

To resolve this, I added an extra step to ensure all path / chars are replaced with \ before trying to determine the virtual path. This is only executed on Windows.

Parsifa1 commented 2 months ago

@danielfalk Is it possible to merge this commit as soon as possible? Many thanks :)

WayenVan commented 1 week ago

a more solid solution is to use plenary.nvim for path operation.