diff options
author | Neil <nyamatongwe@gmail.com> | 2018-04-17 08:23:18 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2018-04-17 08:23:18 +1000 |
commit | 255d2d33abf4c2c5a918bacde049004e52b7986f (patch) | |
tree | 4a563a7d7a9594be0e67b6be6c2c493d8ffea9ec /src/CellBuffer.cxx | |
parent | ec79c307ff36cdcce0e520e67bef69e64a3e19b5 (diff) | |
download | scintilla-mirror-255d2d33abf4c2c5a918bacde049004e52b7986f.tar.gz |
Add SC_DOCUMENTOPTION_TEXT_LARGE option for documents larger than 2 GigaBytes.
This option is provisional and experimental.
Diffstat (limited to 'src/CellBuffer.cxx')
-rw-r--r-- | src/CellBuffer.cxx | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/src/CellBuffer.cxx b/src/CellBuffer.cxx index d6d83c20b..fcc75a741 100644 --- a/src/CellBuffer.cxx +++ b/src/CellBuffer.cxx @@ -364,12 +364,17 @@ 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::make_unique<LineVector<Sci::Position>>(); + if (largeDocument) + plv = std::make_unique<LineVector<Sci::Position>>(); + else + plv = std::make_unique<LineVector<int>>(); + } CellBuffer::~CellBuffer() { @@ -556,6 +561,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(); } |