Move a position so it is still after the same character as before the deletion if that character is still present else after the previous surviving character.
| 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. |
| 4720 | static inline int MovePositionForDeletion ( int position, int startDeletion, int length ) |
| 4721 | { |
| 4722 | if ( position > startDeletion ) { |
| 4723 | int endDeletion = startDeletion + length; |
| 4724 | if ( position > endDeletion ) { |
| 4725 | return position - length; |
| 4726 | } else { |
| 4727 | return startDeletion; |
| 4728 | } |
| 4729 | } else { |
| 4730 | return position; |
| 4731 | } |
| 4732 | } |
| 4733 | |
| 4734 | void Editor::NotifyModified ( Document *, DocModification mh, void * ) |
| 4735 | { |