Skip to content

Commit bcf9934

Browse files
committed
remove redundant code
1 parent 0214d09 commit bcf9934

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

lua/strive/init.lua

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -846,12 +846,8 @@ function Plugin:ft(filetypes)
846846
end
847847
if item:find(self.plugin_name, 1, true) then
848848
local data = _split(item, '%s')
849-
if data[1] == '*' or data[1] == vim.bo[args.buf].filetype then
850-
local au_id = data[3]:match('(%d+):')
851-
if not au_id then
852-
return
853-
end
854-
local g = res[group_start]:match('^(.-)%s+FileType$')
849+
local g = res[group_start]:match('^(.-)%s+FileType$')
850+
if g and (data[1] == '*' or data[1] == vim.bo[args.buf].filetype) then
855851
api.nvim_exec_autocmds('FileType', {
856852
group = g,
857853
modeline = false,

0 commit comments

Comments
 (0)