code: def buffer_leave(self, filename):
          
          self.log.debug('buffer_leave: %s', filename)
          # TODO: This is questionable, and we should use location list for
          # single-file errors.
          self.editor.clean_errors()
docs: User is changing of buffer.