Simplify IsDirty check

This commit is contained in:
Zachary Yedidia
2016-05-14 12:04:13 -04:00
parent 29ae840413
commit e2efc963b7
6 changed files with 105 additions and 126 deletions

View File

@@ -138,7 +138,7 @@ func (v *View) ScrollDown(n int) {
// causing them to lose the unsaved changes
// The message is what to print after saying "You have unsaved changes. "
func (v *View) CanClose(msg string) bool {
if v.Buf.IsDirty() {
if v.Buf.IsModified {
quit, canceled := messenger.Prompt("You have unsaved changes. " + msg)
if !canceled {
if strings.ToLower(quit) == "yes" || strings.ToLower(quit) == "y" {