mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-19 22:23:33 +01:00
Changeset: Explain why number of removals doesn't matter
This commit is contained in:
parent
6495b1e6f4
commit
10c55a2328
1 changed files with 3 additions and 2 deletions
|
@ -808,11 +808,12 @@ class TextLinesMutator {
|
||||||
* Indicates if curLine is already in the splice. This is necessary because the last element in
|
* Indicates if curLine is already in the splice. This is necessary because the last element in
|
||||||
* curSplice is curLine when this line is currently worked on (e.g. when skipping or inserting).
|
* curSplice is curLine when this line is currently worked on (e.g. when skipping or inserting).
|
||||||
*
|
*
|
||||||
* TODO(doc) why aren't removals considered?
|
|
||||||
*
|
|
||||||
* @returns {boolean} true if curLine is in splice
|
* @returns {boolean} true if curLine is in splice
|
||||||
*/
|
*/
|
||||||
_isCurLineInSplice() {
|
_isCurLineInSplice() {
|
||||||
|
// The value of `this._curSplice[1]` does not matter when determining the return value because
|
||||||
|
// `this._curLine` refers to the line number *after* the splice is applied (so after those lines
|
||||||
|
// are deleted).
|
||||||
return this._curLine - this._curSplice[0] < this._curSplice.length - 2;
|
return this._curLine - this._curSplice[0] < this._curSplice.length - 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue