diff options
Diffstat (limited to 'src/SparseVector.h')
| -rw-r--r-- | src/SparseVector.h | 7 | 
1 files changed, 7 insertions, 0 deletions
| diff --git a/src/SparseVector.h b/src/SparseVector.h index e4e0e3f69..3fa1ac95b 100644 --- a/src/SparseVector.h +++ b/src/SparseVector.h @@ -154,6 +154,13 @@ public:  		starts->InsertText(partition, -1);  		Check();  	} +	Sci::Position IndexAfter(Sci::Position position) const noexcept { +		assert(position < Length()); +		if (position < 0) +			return 0; +		const Sci::Position partition = starts->PartitionFromPosition(position); +		return partition + 1; +	}  	void Check() const {  #ifdef CHECK_CORRECTNESS  		starts->Check(); | 
