-
Whenever I commit using I suppose this isn't necessarly a bug in either extension but maybe misconfiguration. What is the difference between Using LazyVim with Neogit enabled. Putting this line here to make the discussion search friendly. I couldn't copy the entire traceback as nvim is completley broken in this phase. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Let's have a look. Here's the function run when with [mapping_I["Submit"]] = function(buffer)
logger.debug("[EDITOR] Action I: Submit")
vim.cmd.stopinsert()
if amend_header then
buffer:set_lines(0, 0, false, amend_header)
amend_header = nil
end
buffer:write()
buffer:close(true)
end, Stops insert, writes the amend header to the file (if present), writes the buffer, and closes it with force (the We can compare that to the normal-mode [mapping["Close"]] = function(buffer)
logger.debug("[EDITOR] Action N: Close")
if amend_header then
buffer:set_lines(0, 0, false, amend_header)
amend_header = nil
end
if buffer:get_option("modified") and not input.get_confirmation("Save changes?") then
aborted = true
end
buffer:write()
buffer:close(true)
end, Pretty much the same, except it has slightly different logic around aborting the commit. Both of these would then trigger the My guess here is some kind of race condition, where the I suspect if you added a bit like this to the decoration provider function it would work: on_win = function(_, win)
if self.extmark_buf and not vim.api.nvim_buf_is_loaded(self.extmark_buf) then
return false
end
-- ... etc |
Beta Was this translation helpful? Give feedback.
Let's have a look.
Here's the function run when with
<c-c><c-c>
: https://github.com/NeogitOrg/neogit/blob/master/lua/neogit/buffers/editor/init.lua#L202-L212Stops insert, writes the amend header to the file (if present), writes the buffer, and closes it with force (the
true
)We can compare that to the normal-mode
q
function: https://github.com/NeogitOrg/neogit/b…