Exemplo n.º 1
0
        public void GoLeft(bool shift)
        {
            ColumnSelectionMode = false;

            if (!shift)
            {
                if (start > end)
                {
                    Start = End;
                    return;
                }
            }

            if (start.iChar != 0 || start.iLine != 0)
            {
                if (start.iChar > 0 && tb.lineInfos[start.iLine].VisibleState == VisibleState.Visible)
                {
                    start.Offset(-1, 0);
                }
                else
                {
                    int i = tb.FindPrevVisibleLine(start.iLine);
                    if (i == start.iLine)
                    {
                        return;
                    }
                    start = new Place(tb[i].Count, i);
                }
            }

            if (!shift)
            {
                end = start;
            }

            OnSelectionChanged();

            preferedPos = -1;
        }