UpdateLinesInfo() public static method

Call this on SCN_MODIFIED event from scintilla to update the info on lines
public static UpdateLinesInfo ( SCNotification scn, bool isInsertion ) : void
scn _3PA.Interop.SCNotification
isInsertion bool
return void
Exemplo n.º 1
0
Arquivo: Plug.cs Projeto: devjerome/3P
        public static void OnSciModified(SCNotification nc)
        {
            bool deletedText = (nc.modificationType & (int)SciMsg.SC_MOD_DELETETEXT) != 0;

            // if the text has changed
            if (deletedText || (nc.modificationType & (int)SciMsg.SC_MOD_INSERTTEXT) != 0)
            {
                // observe modifications to lines (MANDATORY)
                Npp.UpdateLinesInfo(nc, !deletedText);

                // parse
                ParserHandler.ParseCurrentDocument();
            }

            // did the user supress 1 char?
            if (deletedText && nc.length == 1)
            {
                AutoComplete.UpdateAutocompletion();
            }
        }