diff options
author | Neil <nyamatongwe@gmail.com> | 2022-07-20 11:08:49 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2022-07-20 11:08:49 +1000 |
commit | 5d0ebf7f0e4a815121d5a10f2134a5bec52d7ba0 (patch) | |
tree | 81ab21b3c50f5c589e31bbe31bf193e6dc1e37bb /src/SparseVector.h | |
parent | f762546cc4149cc6b4b3dadc023b410e5b093bc4 (diff) | |
download | scintilla-mirror-5d0ebf7f0e4a815121d5a10f2134a5bec52d7ba0.tar.gz |
Add DeleteAll method as quick way to clear everything.
Improves similarity to RunStyles.
Diffstat (limited to 'src/SparseVector.h')
-rw-r--r-- | src/SparseVector.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/SparseVector.h b/src/SparseVector.h index cfd9db02e..01d651f0d 100644 --- a/src/SparseVector.h +++ b/src/SparseVector.h @@ -147,6 +147,11 @@ public: starts->InsertText(partition, -1); Check(); } + void DeleteAll() { + starts = std::make_unique<Partitioning<Sci::Position>>(8); + values = std::make_unique<SplitVector<T>>(); + values->InsertEmpty(0, 2); + } void DeleteRange(Sci::Position position, Sci::Position deleteLength) { // For now, delete elements in range - may want to leave value at start // or combine onto position. |