diff options
author | mitchell <unknown> | 2018-05-05 23:10:51 -0400 |
---|---|---|
committer | mitchell <unknown> | 2018-05-05 23:10:51 -0400 |
commit | 92676970616a5163636329e49c4cc825e46d6c7f (patch) | |
tree | 9e2cc612919e2bc1ee50a31dc0fd8bb7652d94d7 /src/CellBuffer.cxx | |
parent | 74d9510a055d6b9aa9d7679522f255db62de76d0 (diff) | |
download | scintilla-mirror-92676970616a5163636329e49c4cc825e46d6c7f.tar.gz |
Backport: Add SC_DOCUMENTOPTION_TEXT_LARGE option for documents larger than 2 GigaBytes.
This option is provisional and experimental.
Backport of changesets 6696:9729ff36c5b1 and 6723:cffe824ab55e. Also added
'#include <cstddef>' to top of src/RESearch.cxx to fix 32-bit build error.
Diffstat (limited to 'src/CellBuffer.cxx')
-rw-r--r-- | src/CellBuffer.cxx | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/CellBuffer.cxx b/src/CellBuffer.cxx index b1836b924..41dd36b56 100644 --- a/src/CellBuffer.cxx +++ b/src/CellBuffer.cxx @@ -364,12 +364,16 @@ void UndoHistory::CompletedRedoStep() { currentAction++; } -CellBuffer::CellBuffer(bool hasStyles_) : - hasStyles(hasStyles_) { +CellBuffer::CellBuffer(bool hasStyles_, bool largeDocument_) : + hasStyles(hasStyles_), largeDocument(largeDocument_) { readOnly = false; utf8LineEnds = 0; collectingUndo = true; plv = std::unique_ptr<LineVector<Sci::Position>>(new LineVector<Sci::Position>()); + if (largeDocument) + plv = std::unique_ptr<LineVector<Sci::Position>>(new LineVector<Sci::Position>()); + else + plv = std::unique_ptr<LineVector<int>>(new LineVector<int>()); } CellBuffer::~CellBuffer() { @@ -556,6 +560,14 @@ void CellBuffer::SetReadOnly(bool set) { readOnly = set; } +bool CellBuffer::IsLarge() const { + return largeDocument; +} + +bool CellBuffer::HasStyles() const { + return hasStyles; +} + void CellBuffer::SetSavePoint() { uh.SetSavePoint(); } |