diff --git a/PROMS/Volian.Controls.Library/StepRTB.cs b/PROMS/Volian.Controls.Library/StepRTB.cs index 42ac134e..ef094604 100644 --- a/PROMS/Volian.Controls.Library/StepRTB.cs +++ b/PROMS/Volian.Controls.Library/StepRTB.cs @@ -1128,8 +1128,15 @@ namespace Volian.Controls.Library { if (SelectionStart >= 7) { - DebugPrint("HSC===================>ll Insert: Sel {0}, Length {1}, Link Start {2}, Link Length {3}", SelectionStart, SelectionLength, ll.Start, ll.Length); - SelectionStart = ll.Start - 7; + // If the cursor is at the beginning of the line and a link is at the beginning of the line + // then select the link rather than postitioning the cursor at the end of the previous line + if (GetFirstCharIndexOfCurrentLine() == SelectionStart) + SetSelection(ll); + else + { + DebugPrint("HSC===================>ll Insert: Sel {0}, Length {1}, Link Start {2}, Link Length {3}", SelectionStart, SelectionLength, ll.Start, ll.Length); + SelectionStart = ll.Start - 7; + } } } else if (SelectionStart + SelectionLength > ll.End) // Beyond the end of the starting link