aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/CellBuffer.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/CellBuffer.cxx')
-rw-r--r--src/CellBuffer.cxx17
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();
}