smart-open.nvim icon indicating copy to clipboard operation
smart-open.nvim copied to clipboard

fix: consistent path separator on windows

Open scottmckendry opened this issue 1 year ago • 2 comments

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.

scottmckendry avatar Jun 30 '24 02:06 scottmckendry

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

Parsifa1 avatar Jul 11 '24 16:07 Parsifa1

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

WayenVan avatar Sep 27 '24 17:09 WayenVan

I'm merging this into 0.3.x, if anybody wants to contribute a more solid solution, I'm open, but I'll take this for now.

danielfalk avatar Oct 15 '24 12:10 danielfalk