Skip to content

Commit

Permalink
Merge pull request #1039 from ttytm/fix/abort
Browse files Browse the repository at this point in the history
  • Loading branch information
CKolkey authored Dec 16, 2023
2 parents 4221b79 + 7ecf75a commit 69fb64c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lua/neogit/buffers/commit_editor/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,11 @@ function M:open()
mappings = {
n = {
[mapping["Close"]] = function(buffer)
if buffer:get_option("modified") and input.get_confirmation("Save changes?") then
buffer:write()
if buffer:get_option("modified") and not input.get_confirmation("Save changes?") then
aborted = true
end

buffer:write()
buffer:close(true)
end,
[mapping["Submit"]] = function(buffer)
Expand Down

0 comments on commit 69fb64c

Please sign in to comment.