Rename moveStart to moveStartForwards
So it it's clear what it does Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>pull/21833/head
parent
609196a240
commit
d36f8ccb95
|
@ -177,7 +177,7 @@ export default class BasicMessageEditor extends React.Component<IProps, IState>
|
|||
// because we'll replace the whole range with an emoji,
|
||||
// so move the start forward to the start of the emoticon.
|
||||
// Take + 1 because index is reported without the possible preceding space.
|
||||
range.moveStart(emoticonMatch.index + moveStart);
|
||||
range.moveStartForwards(emoticonMatch.index + moveStart);
|
||||
// and move end backwards so that we don't replace the trailing space/newline
|
||||
range.moveEndBackwards(moveEnd);
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ export default class Range {
|
|||
this._end = bIsLarger ? positionB : positionA;
|
||||
}
|
||||
|
||||
moveStart(delta: number) {
|
||||
moveStartForwards(delta: number) {
|
||||
this._start = this._start.forwardsWhile(this.model, () => {
|
||||
delta -= 1;
|
||||
return delta >= 0;
|
||||
|
|
Loading…
Reference in New Issue