Add readonly option

This commit is contained in:
Zachary Yedidia
2019-06-17 17:45:38 -04:00
parent 5bd54747b3
commit 55e33badd0
4 changed files with 27 additions and 9 deletions

View File

@@ -35,6 +35,8 @@ func (b *Buffer) SetOptionNative(option string, nativeValue interface{}) error {
}
} else if option == "encoding" {
b.isModified = true
} else if option == "readonly" {
b.Type.Readonly = nativeValue.(bool)
}
return nil