Skip to content

Commit

Permalink
fix: empty filetype exclude
Browse files Browse the repository at this point in the history
fix #662
  • Loading branch information
lukas-reineke committed Oct 1, 2023
1 parent 1e79f3d commit 3435ed7
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lua/ibl/utils.lua
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,11 @@ end

---@param bufnr number
M.get_filetypes = function(bufnr)
return vim.split(
vim.api.nvim_get_option_value("filetype", { buf = bufnr }),
".",
{ plain = true, trimempty = true }
)
local filetype = vim.api.nvim_get_option_value("filetype", { buf = bufnr })
if filetype == "" then
return { "" }
end
return vim.split(filetype, ".", { plain = true, trimempty = true })
end

local has_end_reg = vim.regex "^\\s*\\(}\\|]\\|)\\|end\\)"
Expand Down

0 comments on commit 3435ed7

Please sign in to comment.