From f2e9d7ae40e93c808e7427683920aa5c220d5698 Mon Sep 17 00:00:00 2001 From: Simon Cropp Date: Sat, 22 Aug 2026 13:30:56 +1000 Subject: [PATCH] Tidy two pieces of definition data BeyondCompare listed .tbz2 and .iso twice each. Harmless to matching, since the set is a set, but the generated docs repeated them and a reader has no way to tell a deliberate duplicate from an oversight. Neovim hardcoded C:\Program Files\Neovim\bin. Written as a literal it gets no expansion, so it misses ProgramW6432 and the x86 variant that %ProgramFiles% resolves, and it assumes Windows is installed on C: - which is not something the other definitions assume. --- docs/diff-tool.md | 6 ++++-- src/DiffEngine.Tests/diffTools.include.md | 6 ++++-- src/DiffEngine/Implementation/BeyondCompare.cs | 2 -- src/DiffEngine/Implementation/Neovim.cs | 5 ++++- 4 files changed, 12 insertions(+), 7 deletions(-) diff --git a/docs/diff-tool.md b/docs/diff-tool.md index e803b25c..8d1d19f8 100644 --- a/docs/diff-tool.md +++ b/docs/diff-tool.md @@ -148,7 +148,7 @@ Non-MDI tools are preferred since it allows [DiffEngineTray](tray.md) to track a * Use shell execute: True * Create no window: False * Environment variable for custom install location: `DiffEngine_BeyondCompare` - * Supported binaries: .7z, .bcpkg, .bin, .bmp, .bz, .bz2, .cab, .chm, .deb, .ear, .gif, .gz, .ico, .img, .iso, .iso, .jar, .jpeg, .jpg, .kmz, .nupkg, .pdf, .png, .rar, .rpm, .rtf, .svg, .swm, .tar, .tbz, .tbz2, .tbz2, .tgz, .tif, .tiff, .war, .webp, .wim, .xlsx, .xz, .zip, .zipx + * Supported binaries: .7z, .bcpkg, .bin, .bmp, .bz, .bz2, .cab, .chm, .deb, .ear, .gif, .gz, .ico, .img, .iso, .jar, .jpeg, .jpg, .kmz, .nupkg, .pdf, .png, .rar, .rpm, .rtf, .svg, .swm, .tar, .tbz, .tbz2, .tgz, .tif, .tiff, .war, .webp, .wim, .xlsx, .xz, .zip, .zipx #### Tool order: @@ -664,7 +664,9 @@ DiffTools.UseOrder(DiffTool.Neovim); -d "tempFile.txt" "targetFile.txt" ``` * Scanned paths: - * `C:\Program Files\Neovim\binnvim.exe` + * `%ProgramFiles%\Neovim\bin\nvim.exe` + * `%ProgramW6432%\Neovim\bin\nvim.exe` + * `%ProgramFiles(x86)%\Neovim\bin\nvim.exe` * `%PATH%nvim.exe` #### OSX settings: diff --git a/src/DiffEngine.Tests/diffTools.include.md b/src/DiffEngine.Tests/diffTools.include.md index 1a99761c..023edb7f 100644 --- a/src/DiffEngine.Tests/diffTools.include.md +++ b/src/DiffEngine.Tests/diffTools.include.md @@ -13,7 +13,7 @@ Non-MDI tools are preferred since it allows [DiffEngineTray](tray.md) to track a * Use shell execute: True * Create no window: False * Environment variable for custom install location: `DiffEngine_BeyondCompare` - * Supported binaries: .7z, .bcpkg, .bin, .bmp, .bz, .bz2, .cab, .chm, .deb, .ear, .gif, .gz, .ico, .img, .iso, .iso, .jar, .jpeg, .jpg, .kmz, .nupkg, .pdf, .png, .rar, .rpm, .rtf, .svg, .swm, .tar, .tbz, .tbz2, .tbz2, .tgz, .tif, .tiff, .war, .webp, .wim, .xlsx, .xz, .zip, .zipx + * Supported binaries: .7z, .bcpkg, .bin, .bmp, .bz, .bz2, .cab, .chm, .deb, .ear, .gif, .gz, .ico, .img, .iso, .jar, .jpeg, .jpg, .kmz, .nupkg, .pdf, .png, .rar, .rpm, .rtf, .svg, .swm, .tar, .tbz, .tbz2, .tgz, .tif, .tiff, .war, .webp, .wim, .xlsx, .xz, .zip, .zipx #### Tool order: @@ -529,7 +529,9 @@ DiffTools.UseOrder(DiffTool.Neovim); -d "tempFile.txt" "targetFile.txt" ``` * Scanned paths: - * `C:\Program Files\Neovim\binnvim.exe` + * `%ProgramFiles%\Neovim\bin\nvim.exe` + * `%ProgramW6432%\Neovim\bin\nvim.exe` + * `%ProgramFiles(x86)%\Neovim\bin\nvim.exe` * `%PATH%nvim.exe` #### OSX settings: diff --git a/src/DiffEngine/Implementation/BeyondCompare.cs b/src/DiffEngine/Implementation/BeyondCompare.cs index 26a30387..8c73d3c6 100644 --- a/src/DiffEngine/Implementation/BeyondCompare.cs +++ b/src/DiffEngine/Implementation/BeyondCompare.cs @@ -45,12 +45,10 @@ static string RightOsxLinuxArguments(string temp, string target) => ".bz2", ".tbz", ".tbz2", - ".tbz2", ".chm", ".deb", ".img", ".iso", - ".iso", ".gz", ".tgz", ".cab", diff --git a/src/DiffEngine/Implementation/Neovim.cs b/src/DiffEngine/Implementation/Neovim.cs index 544b2fdd..d7701e76 100644 --- a/src/DiffEngine/Implementation/Neovim.cs +++ b/src/DiffEngine/Implementation/Neovim.cs @@ -20,7 +20,10 @@ public static Definition Neovim() Windows: new( "nvim.exe", launchArguments, - searchDirectory: @"C:\Program Files\Neovim\bin"), + // %ProgramFiles%, not the literal path: expansion is what picks up + // ProgramW6432 and the x86 variant, and what makes this work on a + // machine whose Windows is not on C: + searchDirectory: @"%ProgramFiles%\Neovim\bin\"), Linux: new( "nvim", launchArguments),