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

@@ -211,7 +211,7 @@ func NewBuffer(r io.Reader, size int64, path string, startcursor Loc, btype BufT
b.EventHandler = NewEventHandler(b.SharedBuffer, b.cursors)
}
if b.Settings["readonly"].(bool) {
if b.Settings["readonly"].(bool) && b.Type == BTDefault {
b.Type.Readonly = true
}