Skip to content

Commit

Permalink
feat: capture the preceding number for ChatRespond (#178)
Browse files Browse the repository at this point in the history
  • Loading branch information
ziboh authored Jul 29, 2024
1 parent 2ecf538 commit 14a37df
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lua/gp/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2429,9 +2429,11 @@ M.chat_respond = function(params)
end

M.cmd.ChatRespond = function(params)
if params.args == "" then
if params.args == "" and vim.v.count == 0 then
M.chat_respond(params)
return
elseif params.args == "" and vim.v.count ~= 0 then
params.args = tostring(vim.v.count)
end

-- ensure args is a single positive number
Expand Down

0 comments on commit 14a37df

Please sign in to comment.