diff options
-rwxr-xr-x | plugins/snippets/snippets/Document.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/plugins/snippets/snippets/Document.py b/plugins/snippets/snippets/Document.py index d832f0b9..07faf2a8 100755 --- a/plugins/snippets/snippets/Document.py +++ b/plugins/snippets/snippets/Document.py @@ -727,6 +727,14 @@ class Document: self.update_snippet_contents) def on_buffer_changed(self, buf): + for snippet in list(self.active_snippets): + begin = snippet.begin_iter() + end = snippet.end_iter() + + if begin.compare(end) >= 0: + # Begin collapsed on end, just remove it + self.deactivate_snippet(snippet) + current = self.current_placeholder() if current: |