-// IsDirty returns whether or not the buffer has been modified compared to the one on disk
-func (b *Buffer) IsDirty() bool {
- if !b.dirtySinceLastCheck {
- return false
- }
- if b.netInsertions == 0 {
- isDirty := b.savedText != md5.Sum([]byte(b.String()))
- b.dirtySinceLastCheck = isDirty
- return isDirty
- }
- return true
-}
-