Skip to content

Commit 60571f0

Browse files
committed
🐛fix(:CompilerRedo): Do not evaluate the filetype if we are redoing a build automation utility.
This regression was preventing redo from working correctly on build automation utilities.
1 parent 7da4af4 commit 60571f0

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

lua/compiler/init.lua

+9-7
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,15 @@ M.setup = function(opts)
2323
)
2424
return
2525
end
26-
-- If filetype is not the same as when the option was selected, send a notification.
27-
local current_filetype = vim.bo.filetype
28-
if _G.compiler_redo_filetype ~= current_filetype then
29-
vim.notify("You are on a different language now. Open the compiler and select an option before doing redo.",
30-
vim.log.levels.INFO, { title = "Compiler.nvim" }
31-
)
32-
return
26+
if _G.compiler_redo_filetype then
27+
-- If filetype is not the same as when the option was selected, send a notification.
28+
local current_filetype = vim.bo.filetype
29+
if _G.compiler_redo_filetype ~= current_filetype then
30+
vim.notify("You are on a different language now. Open the compiler and select an option before doing redo.",
31+
vim.log.levels.INFO, { title = "Compiler.nvim" }
32+
)
33+
return
34+
end
3335
end
3436
-- Redo
3537
local bau = _G.compiler_redo_bau

0 commit comments

Comments
 (0)