Skip to content

Commit

Permalink
skip save dialog on quit if buffer is shared (#3559)
Browse files Browse the repository at this point in the history
  • Loading branch information
matthias314 authored Dec 9, 2024
1 parent fb20818 commit 8cdf68b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions internal/action/actions.go
Original file line number Diff line number Diff line change
Expand Up @@ -1894,6 +1894,13 @@ func (h *BufPane) ForceQuit() bool {
// Quit this will close the current tab or view that is open
func (h *BufPane) Quit() bool {
if h.Buf.Modified() {
for _, b := range buffer.OpenBuffers {
if b != h.Buf && b.SharedBuffer == h.Buf.SharedBuffer {
h.ForceQuit()
return true
}
}

if config.GlobalSettings["autosave"].(float64) > 0 {
// autosave on means we automatically save when quitting
h.SaveCB("Quit", func() {
Expand Down

0 comments on commit 8cdf68b

Please sign in to comment.