Add SaveAll command and display + for modified tabs

Closes #651
This commit is contained in:
Zachary Yedidia
2017-05-05 11:05:23 -04:00
parent 8d1618692e
commit a6ee75a9cf
5 changed files with 27 additions and 3 deletions

View File

@@ -705,6 +705,24 @@ func (v *View) InsertTab(usePlugin bool) bool {
return true
}
// SaveAll saves all open buffers
func (v *View) SaveAll(usePlugin bool) bool {
if usePlugin && !PreActionCall("SaveAll", v) {
return false
}
for _, t := range tabs {
for _, v := range t.views {
v.Save(false)
}
}
if usePlugin {
return PostActionCall("SaveAll", v)
}
return false
}
// Save the buffer to disk
func (v *View) Save(usePlugin bool) bool {
if usePlugin && !PreActionCall("Save", v) {