Prompt to save or discard new files even with autosave enabled (#3626)

This commit is contained in:
yz778 2025-01-25 11:24:31 -08:00 committed by GitHub
parent 698511c5b6
commit c02036e52f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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()