We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 19c7ba1 commit a203480Copy full SHA for a203480
lua/conform/runner.lua
@@ -268,7 +268,9 @@ M.apply_format = function(
268
if not dry_run then
269
log.trace("Applying text edits: %s", text_edits)
270
if undojoin then
271
- vim.cmd.undojoin()
+ -- may fail if after undo
272
+ -- Vim:E790: undojoin is not allowed after undo
273
+ pcall(vim.cmd.undojoin)
274
end
275
vim.lsp.util.apply_text_edits(text_edits, bufnr, "utf-8")
276
log.trace("Done formatting %s", bufname)
0 commit comments