only prompt the user if they can close all buffers, otherwise it would be misleading
@@ -1443,9 +1443,11 @@ func (v *View) QuitAll(usePlugin bool) bool {
}
}
+ if closeAll {
+ // only quit if all of the buffers can be closed and the user confirms that they actually want to quit everything
should_quit, _ := messenger.YesNoPrompt("Do you want to quit micro (all open files will be closed)?")
- if should_quit && closeAll {
+ if should_quit {
for _, tab := range tabs {
for _, v := range tab.views {
v.CloseBuffer()
@@ -1459,6 +1461,7 @@ func (v *View) QuitAll(usePlugin bool) bool {
screen.Fini()
os.Exit(0)
}
+ }
return false
}
