mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-29 06:12:35 +09:00
Simplify IsDirty check
This commit is contained in:
@@ -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" {
|
||||
|
||||
Reference in New Issue
Block a user