Skip to content

Commit

Permalink
fix(setup_command): Fix error when redefining Gitsigns
Browse files Browse the repository at this point in the history
Replace bang with force in the command-attributes, since the latter
is equivalent to "command! Gitsigns" when using nvim_add_user_command.
Using bang without force is equivalent to "command -bang Gitsigns".

This closes #433

Signed-off-by: Joshua Wong <joshua99wong@gmail.com>
  • Loading branch information
jwong101 authored and lewis6991 committed Dec 30, 2021
1 parent 9a8226e commit 285622c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lua/gitsigns.lua

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion teal/gitsigns.tl
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ local function setup_command()
local fargs = vim.split(params.args, '%s+')
M._run_func({params.range, params.line1, params.line2}, unpack(fargs))
end, {
bang = true,
force = true,
nargs = '+',
range = true,
complete = M._complete
Expand Down

0 comments on commit 285622c

Please sign in to comment.