summaryrefslogtreecommitdiff
path: root/src/buffer.hh
diff options
context:
space:
mode:
authorMaxime Coste <mawww@kakoune.org>2021-05-28 17:03:06 +1000
committerMaxime Coste <mawww@kakoune.org>2021-05-28 17:03:41 +1000
commite4a23a64faf56b5822fee13d976e038174408238 (patch)
tree16f2198e342de7e1237b98aa5795fe80114632e8 /src/buffer.hh
parent38f85706ffabe33734a6759a3b19405b755fffb8 (diff)
Support opening files bigger than 2 GiB
The real technical limit is with lines bigger than 2 GiB and buffers with more than 2 Gi lines, refactor buffer loading to make it possible to load those files. Fix an overflow with the hash_data function at the same time
Diffstat (limited to 'src/buffer.hh')
-rw-r--r--src/buffer.hh8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/buffer.hh b/src/buffer.hh
index 73e5b370..4bd1409e 100644
--- a/src/buffer.hh
+++ b/src/buffer.hh
@@ -129,8 +129,10 @@ public:
enum class HistoryId : size_t { First = 0, Invalid = (size_t)-1 };
- Buffer(String name, Flags flags, StringView data = {},
- timespec fs_timestamp = InvalidTime);
+ Buffer(String name, Flags flags, BufferLines lines,
+ ByteOrderMark bom = ByteOrderMark::None,
+ EolFormat eolformat = EolFormat::Lf,
+ FsStatus fs_status = {InvalidTime, {}, {}});
Buffer(const Buffer&) = delete;
Buffer& operator= (const Buffer&) = delete;
~Buffer();
@@ -210,7 +212,7 @@ public:
void run_hook_in_own_context(Hook hook, StringView param,
String client_name = {});
- void reload(StringView data, timespec fs_timestamp = InvalidTime);
+ void reload(BufferLines lines, ByteOrderMark bom, EolFormat eolformat, FsStatus status);
void check_invariant() const;