You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The documentation says :Gitsigns {subcmd} {args} is equivalent to :lua require('gitsigns').{subcmd}({args}).
However, :lua require("gitsigns").setqflist("all") works but :Gitsigns setqflist all does not work. It returns the qflist for the current buffer.
And I found out the bug, In the file lua/gitsigns/actions.lua, exactly at line number 1234, args[2] is processed for the target parameter of gitsigns.setqflist(target). This is wrong. We have to check for args[1].
What I did...
when ":Gitsigns setqflist all" is run, args parameter in line 1233 will have the values as "{ 'all' }", there is no second value in args.
Now I changed args[2] to args[1] in line 1234, Now everything works fine.
We have to just alter only one line of code to fix the issue. I tried to make pull request but I dont know how to do it although I have git experience for 2 years
The args[1] should be used for target instead of args[2]
Actual behavior
:Gitsigns setqflist all only returns the qflist of current buffer
Minimal config
forname, urlinpairs{
gitsigns='https://github.com/lewis6991/gitsigns.nvim',
-- ADD OTHER PLUGINS _NECESSARY_ TO REPRODUCE THE ISSUE
} dolocalinstall_path=vim.fn.fnamemodify('gitsigns_issue/'..name, ':p')
ifvim.fn.isdirectory(install_path) ==0thenvim.fn.system { 'git', 'clone', '--depth=1', url, install_path }
endvim.opt.runtimepath:append(install_path)
endrequire('gitsigns').setup{
debug_mode=true, -- You must add this to enable debug messages-- ADD GITSIGNS CONFIG THAT IS _NECESSARY_ FOR REPRODUCING THE ISSUE
}
-- ADD INIT.LUA SETTINGS THAT IS _NECESSARY_ FOR REPRODUCING THE ISSUE
Description
The documentation says
:Gitsigns {subcmd} {args}
is equivalent to:lua require('gitsigns').{subcmd}({args})
.However,
:lua require("gitsigns").setqflist("all")
works but:Gitsigns setqflist all
does not work. It returns the qflist for the current buffer.And I found out the bug, In the file
lua/gitsigns/actions.lua
, exactly at line number1234
, args[2] is processed for the target parameter ofgitsigns.setqflist(target)
. This is wrong. We have to check for args[1].What I did...
when ":Gitsigns setqflist all" is run, args parameter in line 1233 will have the values as "{ 'all' }", there is no second value in args.
Now I changed args[2] to args[1] in line 1234, Now everything works fine.
We have to just alter only one line of code to fix the issue. I tried to make pull request but I dont know how to do it although I have git experience for 2 years
Neovim version
NVIM v0.10.0-dev-1318+gf5eabaa94 Build type: RelWithDebInfo LuaJIT 2.1.1696795921
Operating system and version
GNU/Linux Debian 12
Expected behavior
The args[1] should be used for target instead of args[2]
Actual behavior
:Gitsigns setqflist all
only returns the qflist of current bufferMinimal config
Steps to reproduce
nvim --clean -u minimal.lua
:Gitsigns setqflist all
Gitsigns debug messages
:Gitsigns debug_messages
cli.run: Running action 'setqflist' with arguments { "all" }
I added first two lines, As you can see, args has only one argument.
The text was updated successfully, but these errors were encountered: