Description
PathLib:expand() in lua/diffview/path.lua:299 strips the $ prefix from path segments that start with $ but aren't valid environment variables.
Actual behavior
The diff pane for affected files shows the entire file as added (green) on one side and a null buffer on the other, because the local file buffer is opened at a non-existent path.
Steps to reproduce
For reproducing have a file with $ in the name — e.g. a Remix route like routes/($accountId)/entities/$id.tsx
Neovim version
Operating system and version
macOS
Description
PathLib:expand()inlua/diffview/path.lua:299strips the$prefix from path segments that start with$but aren't valid environment variables.Actual behavior
The diff pane for affected files shows the entire file as added (green) on one side and a null buffer on the other, because the local file buffer is opened at a non-existent path.
Steps to reproduce
For reproducing have a file with $ in the name — e.g. a Remix route like routes/($accountId)/entities/$id.tsx
Neovim version
Operating system and version
macOS