public void CharLeft(int i)
{
if (i < 0)
{
CharRight(-i);
return;
}
while (i>0)
{
if ( i <= mCharPosition )
{
mCharPosition -= i;
i=0;
}
else
{
i -= mCharPosition;
if (mLineNum == 1)
{
mCharPosition = 0;
return;
}
else
{
mLineNum--;
mCharPosition = this.LineLength;
i--;// the carriage return moves to the end of the previous line
}
}
}
}