event DocumentChanged(sFile)

Called when the file buffer is edited by the user. The file name is sFile. This event is handled asynchro­nously. That is, it is not called as the user is typing. It is called after a moment of idleness. This allows you edit the file inside this event handler. Note because this function is called asynchronously, it is possible the sFile file may not be open, so you need to test the return value of GetBufHandle(sFile) to make sure it is not hNil.