From c02036e52f857df3c1bf476bbbcb5782d92527ba Mon Sep 17 00:00:00 2001 From: yz778 Date: Sat, 25 Jan 2025 11:24:31 -0800 Subject: [PATCH] Prompt to save or discard new files even with autosave enabled (#3626) --- internal/action/actions.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/action/actions.go b/internal/action/actions.go index e67b7d1b..1a60c1c0 100644 --- a/internal/action/actions.go +++ b/internal/action/actions.go @@ -1917,7 +1917,7 @@ func (h *BufPane) Quit() bool { } } - if config.GlobalSettings["autosave"].(float64) > 0 { + if config.GlobalSettings["autosave"].(float64) > 0 && h.Buf.Path != "" { // autosave on means we automatically save when quitting h.SaveCB("Quit", func() { h.ForceQuit()