Skip to content

Commit 8cdf68b

Browse files
authored
skip save dialog on quit if buffer is shared (zyedidia#3559)
1 parent fb20818 commit 8cdf68b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

internal/action/actions.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1894,6 +1894,13 @@ func (h *BufPane) ForceQuit() bool {
18941894
// Quit this will close the current tab or view that is open
18951895
func (h *BufPane) Quit() bool {
18961896
if h.Buf.Modified() {
1897+
for _, b := range buffer.OpenBuffers {
1898+
if b != h.Buf && b.SharedBuffer == h.Buf.SharedBuffer {
1899+
h.ForceQuit()
1900+
return true
1901+
}
1902+
}
1903+
18971904
if config.GlobalSettings["autosave"].(float64) > 0 {
18981905
// autosave on means we automatically save when quitting
18991906
h.SaveCB("Quit", func() {

0 commit comments

Comments
 (0)