MCPcopy Create free account
hub / github.com/ProgerXP/Notepad2e / MovePositionForDeletion

Function MovePositionForDeletion

scintilla/src/Editor.cxx:4720–4732  ·  view source on GitHub ↗

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.

Source from the content-addressed store, hash-verified

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.
4720static 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
4734void Editor::NotifyModified ( Document *, DocModification mh, void * )
4735{

Callers 1

NotifyModifiedMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected