internal static void PaintHintBrackets(Graphics gr, FastColoredTextBox textbox)
        {
            foreach (Hint hint in textbox.Hints)
            {
                Range r = hint.Range.Clone();
                r.Normalize();
                Point p1 = textbox.PlaceToPoint(r.Start);
                Point p2 = textbox.PlaceToPoint(r.End);
                if (textbox.GetVisibleState(r.Start.iLine) != VisibleState.Visible ||
                    textbox.GetVisibleState(r.End.iLine) != VisibleState.Visible)
                {
                    continue;
                }

                using (var pen = new Pen(hint.BorderColor))
                {
                    pen.DashStyle = DashStyle.Dash;
                    if (r.IsEmpty)
                    {
                        p1.Offset(1, -1);
                        gr.DrawLines(pen, new[] { p1, new Point(p1.X, p1.Y + textbox.CharHeight + 2) });
                    }
                    else
                    {
                        p1.Offset(-1, -1);
                        p2.Offset(1, -1);
                        gr.DrawLines(pen,
                                     new[]
                                         {
                                             new Point(p1.X + textbox.CharWidth/2, p1.Y), p1,
                                             new Point(p1.X, p1.Y + textbox.CharHeight + 2),
                                             new Point(p1.X + textbox.CharWidth/2, p1.Y + textbox.CharHeight + 2)
                                         });
                        gr.DrawLines(pen,
                                     new[]
                                         {
                                             new Point(p2.X - textbox.CharWidth/2, p2.Y), p2,
                                             new Point(p2.X, p2.Y + textbox.CharHeight + 2),
                                             new Point(p2.X - textbox.CharWidth/2, p2.Y + textbox.CharHeight + 2)
                                         });
                    }
                }
            }
        }