private void adjustSelection()
 {
     while (SelectedText.EndsWith(" ") && SelectionLength > 0)
     {
         SelectionLength -= 1;
     }
 }