Fix to allow readonly to be disabled

This commit is contained in:
Zachary Yedidia 2020-02-08 19:37:37 -05:00
parent 2fd59adffa
commit b77980082c
2 changed files with 8 additions and 8 deletions

View file

@ -35,7 +35,7 @@ func (b *Buffer) SetOptionNative(option string, nativeValue interface{}) error {
}
} else if option == "encoding" {
b.isModified = true
} else if option == "readonly" && b.Type == BTDefault {
} else if option == "readonly" && b.Type.Kind == BTDefault.Kind {
b.Type.Readonly = nativeValue.(bool)
}

File diff suppressed because one or more lines are too long