Skip to content

[Bug] PathLib:expand() strips $ from filenames that aren't environment variables #618

Description

@nsinotov

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

Neovim 0.11.6

Operating system and version

macOS

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions