fix(cmdline): prevent hangs from shellcmd completion on win32/wsl#1933
fix(cmdline): prevent hangs from shellcmd completion on win32/wsl#1933
Conversation
|
Need some feedback from WSL users before this PR can get merged. |
|
not super knowledgeable about either wsl or lua but I tested this out and did run into a couple problems system stuff:separator issueFor some reason the separator logic here wasn't working as intended(i think?): :lua vim.print(vim.fn.has('win32'))
0
:lua vim.print(vim.fn.has('wsl'))
1
:lua vim.print(vim.fn.has('win32') and ';' or ':')
;extra windows pathsThe other issue I ran into is that I had more than just I opened a branch & pr in my fork that "fixes" these issues here: https://github.com/vinnymeller/blink.cmp/pull/3/files I don't know that my solution is close to something you'd want to do but my version works as expected for me - basically having any |
|
Hey, thanks for digging into this! Honestly, I'm not super knowledgeable either. I just threw that patch together and tested quickly on a basic Windows VM (no WSL). Good catch on
Yeah, that makes sense. It’s because of the slow cross-filesystem performance between WSL and Windows. Pretty much anything under On regular Windows, though, I think just blacklisting System32 should be enough (I tested it 😄). Anyway, thanks again for your help, I just pushed an update with all these points and added you as a co-author in the commit. If you could confirm that it’s still working fine on your side, that would be great. |
|
@soifou works perfectly for me 😃 |
This change makes the previous attempt to disable shell completion in Windows environments more robust: - Handles both Windows and WSL, instead of only targeting Windows. - Handles all shellcmd completions, e.g. `:term`, not just the `:!` command. - Instead of disabling shellcmd completions entirely, temporarily remove the problematic folders from `PATH`. This avoids hangs while still allowing completion items from other locations to be displayed. Closes #1926 Related #1029 Co-Authored-By: vinnymeller <vinnymeller@proton.me> Co-Authored-By: Liam Dyer <liamcdyer@gmail.com>
|
Tysm! |
This change makes the previous attempt to disable shell completion in Windows environments more robust:
:term, not just the:!command.PATH. This avoids hangs while still allowing completion items from other locations to be displayed.Closes #1926
Related #1029