-
Notifications
You must be signed in to change notification settings - Fork 66
Description
Description
I already fixed this on my fork, but didn't bother opening a PR since the commits are based on my PR #118 from 2023 which still hasn't been looked at... :(
Setting vim.opt.shellcmdflag to make your shell interactive causes the git commands used by this plugin to cause annoying stutters when switching buffers and stuff. This is because the plugin implicitly invokes a shell by passing a string to vim.fn.system(xxxxx), whereas passing a table of arguments can avoid invoking the shell entirely. Git provides a -C flag to specify current working dir, so invoking a shell and running cd is not necessary.
See the commit on my personal fork for an example.
Apparently docs say to prefer vim.system over vim.fn.system as well for Lua, but I didn't want to mess with that and break anything.
Neovim version
NVIM v0.11.2
Build type: RelWithDebInfo
LuaJIT 2.1.1753364724OS information
Arch Linux, kernel 6.15.8
Steps to reproduce
n/a, i found the source of the bug ^^^
Logs
(it doesn't print anything)