Disabling hotreloading in diff mode

This commit is contained in:
Ian Roddis
2025-10-17 09:26:58 -03:00
parent a0122f0893
commit 52dcb040ba
+6
View File
@@ -924,5 +924,11 @@ autocmd("BufWritePost", {
command = ":FormatWrite", command = ":FormatWrite",
}) })
-- Disable change-detection if in diff mode. Allows for diffs involving redirects
-- eg nvim -d <(cmd 1) <(cmd 2)
if (vim.diff) then
vim.opt.autoread = false
end
-- The line beneath this is called `modeline`. See `:help modeline` -- The line beneath this is called `modeline`. See `:help modeline`
-- vim: ts=2 sts=2 sw=2 et -- vim: ts=2 sts=2 sw=2 et