private void DeleteHighlightedRegion() { if (highlight_start >= 0 && highlight_end <= Text.Length) { textline.DeleteRegion(highlight_start, highlight_end); } CancelHighlight(); }