Skip to content

Commit 7798150

Browse files
cameronrsudo-tee
authored andcommitted
fix(input_window): only pass args if they exist
Fixes #127
1 parent aa73e5f commit 7798150

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lua/opencode/ui/input_window.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,8 @@ M._execute_slash_command = function(command)
8989
end, slash_commands)[1]
9090

9191
if command_cfg then
92-
command_cfg.fn(vim.list_slice(parts, 2))
92+
local args = #parts > 1 and vim.list_slice(parts, 2) or nil
93+
command_cfg.fn(args)
9394
else
9495
vim.notify('Unknown command: ' .. cmd, vim.log.levels.WARN)
9596
end

0 commit comments

Comments
 (0)