This commit is contained in:
2010-06-08 20:53:36 +00:00
parent 7e780cace3
commit 58baa1dd81
6 changed files with 220 additions and 181 deletions

View File

@@ -1048,6 +1048,13 @@ namespace Volian.Controls.Library
bool _AdjustingSelection = false;
private bool _ProcessingDelete;
private bool _HandlingCtrlA = false;
private void HandleLocalSelectionChange()
{
if (MyStepItem.MyStepPanel.SelectedStepRTB != this)
return;
HandleSelectionChange();
}
private void HandleSelectionChange()
{
if (_HandlingCtrlA) return;
@@ -1511,7 +1518,7 @@ namespace Volian.Controls.Library
StepRTB_ArrowPressed(e.Control ? E_ArrowKeys.CtrlLeft : E_ArrowKeys.Left);
e.Handled = true;
}
HandleSelectionChange();
HandleLocalSelectionChange();
break;
case Keys.Up:
int ln = GetLineFromCharIndex(SelectionStart);
@@ -1536,7 +1543,7 @@ namespace Volian.Controls.Library
}
else
{
HandleSelectionChange();
HandleLocalSelectionChange();
}
break;
case Keys.Right:
@@ -1557,7 +1564,7 @@ namespace Volian.Controls.Library
StepRTB_ArrowPressed(e.Control ? E_ArrowKeys.CtrlRight : E_ArrowKeys.Right);
e.Handled = true;
}
HandleSelectionChange();
HandleLocalSelectionChange();
break;
case Keys.Down:
int l = GetLineFromCharIndex(SelectionStart);
@@ -1569,11 +1576,11 @@ namespace Volian.Controls.Library
if (e.Control || l == lastLine)
{
StepRTB_ArrowPressed(e.Control ? E_ArrowKeys.CtrlDown : E_ArrowKeys.Down);
HandleSelectionChange();
HandleLocalSelectionChange();
e.Handled = true;
return;
}
if (!e.Shift)HandleSelectionChange();
if (!e.Shift) HandleLocalSelectionChange();
// if shift-down & on link at beginning of box - do special processing (regular processing
// didn't handle it correctly.
if (e.Shift && lastLine > 0 && SelectionStart==0 && _LinkLocations.Count>0 && _LinkLocations[0].Start==7)
@@ -2625,7 +2632,7 @@ namespace Volian.Controls.Library
private void StepRTB_PreviewKeyDown(object sender, PreviewKeyDownEventArgs e)
{
Console.WriteLine("StepRTB_PreviewKeyDown");
//Console.WriteLine("StepRTB_PreviewKeyDown");
if ((e.KeyCode == Keys.Tab) && (!e.Alt && !e.Control))
e.IsInputKey = true;
}