Skip to content

Commit

Permalink
Add undojoin for inline inserts
Browse files Browse the repository at this point in the history
The edits were inserted in a streaming way, polluting
the insert history.
  • Loading branch information
GordianDziwis committed Oct 19, 2024
1 parent b5bcf74 commit 9e75a00
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lua/codecompanion/strategies/inline.lua
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,7 @@ function Inline:submit()

if content then
vim.schedule(function()
vim.cmd.undojoin()
self:append_to_buf(content)
if self.classification.placement == "new" and api.nvim_get_current_buf() == bufnr then
ui.buf_scroll_to_end(bufnr)
Expand Down

0 comments on commit 9e75a00

Please sign in to comment.