If the SC_MOD_INSERTCHECK notification handler sends an empty string via SCI_CHANGEINSERTION, you should not attempt to insert anything.