Skip to content

Commit

Permalink
Merge branch 'main' of github.com:olimorris/codecompanion.nvim
Browse files Browse the repository at this point in the history
  • Loading branch information
olimorris committed Oct 19, 2024
2 parents 78a1012 + 310cb7f commit 8d7ea10
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lua/codecompanion/helpers/tools/editor.lua
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ return {
_attr = { type = "add" },
buffer = 1,
line = 203,
code = " print('Hello World')",
code = "<![CDATA[ print('Hello World')]]>",
},
},
},
Expand All @@ -148,7 +148,7 @@ return {
buffer = 10,
start_line = 199,
end_line = 199,
code = " function M.capitalize()",
code = "<![CDATA[ function M.capitalize()]]>",
},
},
},
Expand Down Expand Up @@ -176,7 +176,7 @@ return {
_attr = { type = "add" },
buffer = 5,
line = 20,
code = "function M.hello_world()",
code = "<![CDATA[function M.hello_world()]]>",
},
},
},
Expand All @@ -194,6 +194,7 @@ return {
- Ensure XML is **valid and follows the schema**
- **Include indentation** in your code
- **Don't escape** special characters
- **Keep the CDATA** section wrapping the code, the code could contain characters reserved by XML.
4. **Actions**:
Expand Down
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 8d7ea10

Please sign in to comment.