Skip to content

Commit d31095f

Browse files
committed
buffer/settings: Add comment why do we need to zero origHash
1 parent 7fe98cc commit d31095f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

internal/buffer/settings.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ func (b *Buffer) SetOptionNative(option string, nativeValue interface{}) error {
1818
if !b.isModified {
1919
calcHash(b, &b.origHash)
2020
} else {
21+
// prevent using an old stale origHash value
2122
b.origHash = [md5.Size]byte{}
2223
}
2324
}

0 commit comments

Comments
 (0)