public void EnsureCurrentTextRun(int index) { Run run = CurrentTextRun; if (run != null && run.HasParent) { SetCurrentCharIndex(index); } else { if (_needUpdateCurrentRun) { SetCurrentCharIndex2(index); _needUpdateCurrentRun = false; } else { SetCurrentCharIndexToBegin(); if (index != -1) { int limit = CurrentLine.CharCount(); if (index > limit) { index = limit; } SetCurrentCharIndex(index); } } } }
public char DoDeleteOneChar() { if (CharIndex < CurrentLine.CharCount()) { //simulate backspace keystroke SetCurrentCharStepRight(); return(BackSpaceOneChar()); } else { return('\0'); } }