/// <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); }
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); }
static public string GetWordAtCursor(this ScintillaGateway document, char[] wordDelimiters = null) { Point point; return(document.GetWordAtCursor(out point, wordDelimiters)); }