From 8cdf68bbf603beef0e4a2df87e39b602a7c8762c Mon Sep 17 00:00:00 2001 From: matthias314 <56549971+matthias314@users.noreply.github.com> Date: Mon, 9 Dec 2024 13:42:19 -0500 Subject: [PATCH] skip save dialog on quit if buffer is shared (#3559) --- internal/action/actions.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/internal/action/actions.go b/internal/action/actions.go index 536a98f2..0256865f 100644 --- a/internal/action/actions.go +++ b/internal/action/actions.go @@ -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() {