Skip to content

Commit

Permalink
🐛fix(:CompilerRedo): Do not evaluate the filetype if we are redoing…
Browse files Browse the repository at this point in the history
… a build automation utility.

This regression was preventing redo from working correctly on build automation
utilities.
  • Loading branch information
Zeioth committed Apr 25, 2024
1 parent 7da4af4 commit 60571f0
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions lua/compiler/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,15 @@ M.setup = function(opts)
)
return
end
-- If filetype is not the same as when the option was selected, send a notification.
local current_filetype = vim.bo.filetype
if _G.compiler_redo_filetype ~= current_filetype then
vim.notify("You are on a different language now. Open the compiler and select an option before doing redo.",
vim.log.levels.INFO, { title = "Compiler.nvim" }
)
return
if _G.compiler_redo_filetype then
-- If filetype is not the same as when the option was selected, send a notification.
local current_filetype = vim.bo.filetype
if _G.compiler_redo_filetype ~= current_filetype then
vim.notify("You are on a different language now. Open the compiler and select an option before doing redo.",
vim.log.levels.INFO, { title = "Compiler.nvim" }
)
return
end
end
-- Redo
local bau = _G.compiler_redo_bau
Expand Down

0 comments on commit 60571f0

Please sign in to comment.