Skip to content

Commit 5dc89bb

Browse files
fix: handle multiple space between command args
1 parent 3d210a5 commit 5dc89bb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lua/rest-nvim/commands.lua

+2-1
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ local rest_command_tbl = {
4848
vim.notify("Running request by name isn't supported yet", vim.log.levels.INFO)
4949
return
5050
end
51+
-- TODO: open result window here (use `:horizontal`)
5152
request.run()
5253
end,
5354
},
@@ -87,7 +88,7 @@ local rest_command_tbl = {
8788

8889
-- If the completion arguments have a whitespace then treat them as a table instead for easiness
8990
if args:find(" ") then
90-
args = vim.split(args, " ")
91+
args = vim.split(args, " ", { trimempty = true })
9192
end
9293
-- If the completion arguments is a table and `set` is the desired action then
9394
-- return a list of files in the current working directory for completion

0 commit comments

Comments
 (0)