fix: autocommands regression

This commit is contained in:
Simon Hauser
2022-07-01 18:58:13 +02:00
parent ef9137d85c
commit 21eea92e72

View File

@@ -1189,7 +1189,7 @@ internal.autocommands = function(opts)
return false return false
end end
local val = selection.value local val = selection.value
local group_name = val.group_name ~= "<anonymous>" or "" local group_name = val.group_name ~= "<anonymous>" and val.group_name or ""
local output = vim.fn.execute("verb autocmd " .. group_name .. " " .. val.event .. " " .. val.pattern, "silent") local output = vim.fn.execute("verb autocmd " .. group_name .. " " .. val.event .. " " .. val.pattern, "silent")
for line in output:gmatch "[^\r\n]+" do for line in output:gmatch "[^\r\n]+" do
local source_file = line:match "Last set from (.*) line %d*$" or line:match "Last set from (.*)$" local source_file = line:match "Last set from (.*) line %d*$" or line:match "Last set from (.*)$"