Exemplo n.º 1
0
        /// <summary>
        /// Selects the wor at caret.
        /// </summary>
        /// <param name="document">The document.</param>
        static public void SelectWorAtCaret(this ScintillaGateway document)
        {
            Point p;

            document.GetWordAtCursor(out p);
            document.SendMessage(SciMsg.SCI_SETSELECTION, p.X, p.Y);
        }
Exemplo n.º 2
0
        static public void ReplaceWordAtCaret(this ScintillaGateway document, string text)
        {
            Point  p;
            string word = document.GetWordAtCursor(out p, SimpleCodeCompletion.Delimiters);

            document.SetSel(p.X, p.Y);
            document.ReplaceSelection(text);
        }
Exemplo n.º 3
0
        static public string GetWordAtCursor(this ScintillaGateway document, char[] wordDelimiters = null)
        {
            Point point;

            return(document.GetWordAtCursor(out point, wordDelimiters));
        }