Move a position so it is still after the same character as before the insertion.
| 4708 | |
| 4709 | // Move a position so it is still after the same character as before the insertion. |
| 4710 | static inline int MovePositionForInsertion ( int position, int startInsertion, int length ) |
| 4711 | { |
| 4712 | if ( position > startInsertion ) { |
| 4713 | return position + length; |
| 4714 | } |
| 4715 | return position; |
| 4716 | } |
| 4717 | |
| 4718 | // Move a position so it is still after the same character as before the deletion if that |
| 4719 | // character is still present else after the previous surviving character. |