diff options
Diffstat (limited to 'helix-view/src/document.rs')
-rw-r--r-- | helix-view/src/document.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/helix-view/src/document.rs b/helix-view/src/document.rs index 3a3b9390..c41b78ad 100644 --- a/helix-view/src/document.rs +++ b/helix-view/src/document.rs @@ -494,6 +494,10 @@ impl Document { pub fn versioned_identifier(&self) -> lsp::VersionedTextDocumentIdentifier { lsp::VersionedTextDocumentIdentifier::new(self.url().unwrap(), self.version) } + + pub fn empty(&self) -> bool { + self.text == "\n" + } } #[cfg(test)] |