'Called when the user switches tabs/windows/buffers.
It basically means that all snippets must be properly
terminated.'

def _leaving_buffer(self):

    while len(self._csnippets):
        self._current_snippet_is_done()
    self._reinit()
