コード例 #1
0
ファイル: NotepadPPGateway.cs プロジェクト: chcg/scripts.npp
        /// <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);
        }
コード例 #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);
        }
コード例 #3
0
        static public string GetWordAtCursor(this ScintillaGateway document, char[] wordDelimiters = null)
        {
            Point point;

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