Problem: Only Windows. If a directory with a single character name is included in the PATH environment variable without a trailing path separator, executable() will not be able to find the executable file under it.
As a specific example, the default installation path for PowerShell v7 is "C:\Program Files\PowerShell\7", but if you set this as is in the PATH environment variable, Vim will not be able to find the pwsh.exe command. In this case, Vim will try to search for "C:\Program Files\PowerShell\7pwsh.exe".
Cause: The after_pathsep() function determines whether the location passed as its second argument immediately follows a path separator. However, in the code where the problem occurred, the second argument was passed a location that might contain a path separator. As a result, it was mistakenly determined that a path separator was present in cases where the final directory name was a single character and not followed by a path separator, and the path to search was incorrect.
Solution: The second argument of the after_pathsep() function is now passed the next pointer where a path separator may exist.
https://github.com/vim/vim/pull/18979
(2 files)
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()