public VisualSelectionRangeSnapShot DoDelete()
{
//recursive
#if DEBUG
if (dbugEnableTextManRecorder)
{
dbugTextManRecorder.WriteInfo("TxLMan::DoDelete");
dbugTextManRecorder.BeginContext();
}
#endif
VisualSelectionRangeSnapShot removedRange = this.RemoveSelectedText();
if (removedRange.IsEmpty())
{
updateJustCurrentLine = true;
char deletedChar = textLineWriter.DoDelete();
//some language
if (deletedChar == '\0')
{
commandHistory.AddDocAction(
new DocActionJoinWithNextLine(
textLineWriter.LineNumber, textLineWriter.CharIndex));
JoinWithNextLine();
updateJustCurrentLine = false;
}
else
{
commandHistory.AddDocAction(
new DocActionDeleteChar(
deletedChar, textLineWriter.LineNumber, textLineWriter.CharIndex));
char nextChar = textLineWriter.NextChar;
if (nextChar != '\0' && textLineWriter.NextCharWidth < 1)
{
//recursive
DoDelete();
}
}
}
#if DEBUG
if (dbugEnableTextManRecorder) dbugTextManRecorder.EndContext();
#endif
return removedRange;
}
#if DEBUG