Readonly should only apply to default buffers

Ref #1298
This commit is contained in:
Zachary Yedidia
2020-01-15 20:09:17 -05:00
parent 7c90f4d6f1
commit 17f0eb80cd
3 changed files with 3 additions and 3 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" {
} else if option == "readonly" && b.Type == BTDefault {
b.Type.Readonly = nativeValue.(bool)
}