aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/CellBuffer.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/CellBuffer.h')
-rw-r--r--src/CellBuffer.h32
1 files changed, 3 insertions, 29 deletions
diff --git a/src/CellBuffer.h b/src/CellBuffer.h
index 7c999a36e..544a26711 100644
--- a/src/CellBuffer.h
+++ b/src/CellBuffer.h
@@ -22,33 +22,7 @@ public:
/**
* The line vector contains information about each of the lines in a cell buffer.
*/
-class LineVector {
-
- Partitioning<int> starts;
- PerLine *perLine;
-
-public:
-
- LineVector();
- // Deleted so LineVector objects can not be copied.
- LineVector(const LineVector &) = delete;
- void operator=(const LineVector &) = delete;
- ~LineVector();
- void Init();
- void SetPerLine(PerLine *pl);
-
- void InsertText(Sci::Line line, Sci::Position delta);
- void InsertLine(Sci::Line line, Sci::Position position, bool lineStart);
- void SetLineStart(Sci::Line line, Sci::Position position);
- void RemoveLine(Sci::Line line);
- Sci::Line Lines() const {
- return starts.Partitions();
- }
- Sci::Line LineFromPosition(Sci::Position pos) const;
- Sci::Position LineStart(Sci::Line line) const {
- return starts.PositionFromPartition(line);
- }
-};
+class ILineVector;
enum actionType { insertAction, removeAction, startAction, containerAction };
@@ -142,7 +116,7 @@ private:
bool collectingUndo;
UndoHistory uh;
- LineVector lv;
+ std::unique_ptr<ILineVector> plv;
bool UTF8LineEndOverlaps(Sci::Position position) const;
void ResetLineEnds();
@@ -175,7 +149,7 @@ public:
void SetPerLine(PerLine *pl);
Sci::Line Lines() const;
Sci::Position LineStart(Sci::Line line) const;
- Sci::Line LineFromPosition(Sci::Position pos) const { return lv.LineFromPosition(pos); }
+ Sci::Line LineFromPosition(Sci::Position pos) const;
void InsertLine(Sci::Line line, Sci::Position position, bool lineStart);
void RemoveLine(Sci::Line line);
const char *InsertString(Sci::Position position, const char *s, Sci::Position insertLength, bool &startSequence);