Add option for very accurate dirty flag

Set the `fastdirty` option flag to off if you really want accurate
reporting on whether the buffer is modified. This is more resource
intensive but it can be useful for people who don't mind.

Closes #787
Closes #467
This commit is contained in:
Zachary Yedidia
2017-09-17 23:33:18 -04:00
parent 19dc9d7bbc
commit fb980bb695
7 changed files with 65 additions and 18 deletions

View File

@@ -199,7 +199,7 @@ func (v *View) ScrollDown(n int) {
// If there are unsaved changes, the user will be asked if the view can be closed
// causing them to lose the unsaved changes
func (v *View) CanClose() bool {
if v.Type == vtDefault && v.Buf.IsModified {
if v.Type == vtDefault && v.Buf.Modified() {
var choice bool
var canceled bool
if v.Buf.Settings["autosave"].(bool) {