Open jayhowey opened 2 days ago
Thanks for the issue!
Yeah, escaping special characters seems to be needed here. As I can not reproduce this on Linux, would you mind testing a solution (similar to yours) in the git-escape
branch? If you could check it with both use case in this issue and the one with spaces (like "C:\Program Files\neovim\bin\nvim.exe" you describe), I'd be really grateful.
aa06718 Fixes this for me! This commit solves my issue.
Thank You So Much - I really appreciate your fast attention to this issue and the effort on preparing a fix. This has been a great and encouraging exchange with the benevolent maintainer of mini.nvim.
I confirm that aa06718 fixes #1006, based on the following quick check:
Thanks for the confirmation!
I'll reopen this until the fix is in the main
branch (hopefully tomorrow).
Contributing guidelines
Module(s)
mini.git
Description
On Windows 10, using Neovim 0.10 stable, the Mini.Git
:Git commit
command gives the following error which might be related to escaping backslashes ( \ ) in Windows paths:My troubleshooting so far has shown that when no spaces are present in the path to the nvim executable, escaping the backslashes is enough to resolve the problem, allowing the _COMMITEDITMSG buffer to open:
Adding
editor = string.gsub(editor, "\\","\\\\")
at line 686 git.lua for example can work,https://github.com/echasnovski/mini.nvim/blob/b8c1d3b2f4cd637760babb8a33ad12fd5afe2ee2/lua/mini/git.lua#L683-L686
However, this fix is incomplete where the path to the nvim executable is something like "C:\Program Files\neovim\bin\nvim.exe" etc. (where the path to nvim.exe contains a space character)
THANK YOU 1000x+ for MINI.NVIM - mini is excellent and has replaced all but 2 of the plugins I use (colorschemes). I'm happy to help here however I can. Thanks!
Neovim version
0.10
Steps to reproduce
nvim file_to_edit
:Git add %
:Git commit
:messages
to see the error message again.Expected behavior
Mini.Diff can reach the nvim executable, Mini.Diff then opens a new _COMMITEDITMSG and the (Windows) user edits the commit message as-usual. On a
:wq
the commit is made to the local repository:Actual behavior
Neovim :messages area shows an error message, _COMMITEDITMSG buffer fails to open: