1
1
mirror of https://github.com/mawww/kakoune.git synced 2024-12-01 16:32:54 +03:00

Ensure ReadOnly buffer flag get reflected to readonly option

Fixes #5110
This commit is contained in:
Maxime Coste 2024-03-04 09:01:19 +11:00
parent e9bd708327
commit dbda8d6dc8

View File

@ -47,6 +47,7 @@ Buffer::Buffer(String name, Flags flags, BufferLines lines,
options().get_local_option("eolformat").set(eolformat); options().get_local_option("eolformat").set(eolformat);
options().get_local_option("BOM").set(bom); options().get_local_option("BOM").set(bom);
options().get_local_option("readonly").set((bool)(flags & Flags::ReadOnly));
// now we may begin to record undo data // now we may begin to record undo data
if (not (flags & Flags::NoUndo)) if (not (flags & Flags::NoUndo))