mirror of
https://github.com/Hopiu/micro.git
synced 2026-03-16 22:10:26 +00:00
skip save dialog on quit if buffer is shared (#3559)
This commit is contained in:
parent
fb20818042
commit
8cdf68bbf6
1 changed files with 7 additions and 0 deletions
|
|
@ -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() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue