diff options
| author | Maxime Coste <mawww@kakoune.org> | 2024-03-04 09:01:19 +1100 |
|---|---|---|
| committer | Maxime Coste <mawww@kakoune.org> | 2024-03-04 09:01:19 +1100 |
| commit | dbda8d6dc838c57625d94b3ec7060ce4c9084a93 (patch) | |
| tree | 42c4f207def0e1439866856b243d4178cc08375d /src/buffer.cc | |
| parent | e9bd708327881976aae4c6f2804d1a8b3c8fdaa5 (diff) | |
Ensure ReadOnly buffer flag get reflected to readonly option
Fixes #5110
Diffstat (limited to 'src/buffer.cc')
| -rw-r--r-- | src/buffer.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/buffer.cc b/src/buffer.cc index 9c38605a..ffb45e18 100644 --- a/src/buffer.cc +++ b/src/buffer.cc @@ -47,6 +47,7 @@ Buffer::Buffer(String name, Flags flags, BufferLines lines, options().get_local_option("eolformat").set(eolformat); 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 if (not (flags & Flags::NoUndo)) |
