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(); } }