summaryrefslogtreecommitdiff
path: root/support/texlab/crates/base-db/src/workspace.rs
diff options
context:
space:
mode:
Diffstat (limited to 'support/texlab/crates/base-db/src/workspace.rs')
-rw-r--r--support/texlab/crates/base-db/src/workspace.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/support/texlab/crates/base-db/src/workspace.rs b/support/texlab/crates/base-db/src/workspace.rs
index 9308c2401d..35e3904d75 100644
--- a/support/texlab/crates/base-db/src/workspace.rs
+++ b/support/texlab/crates/base-db/src/workspace.rs
@@ -75,6 +75,12 @@ impl Workspace {
Cow::Owned(text) => text,
};
+ if let Some(document) = self.lookup_path(path) {
+ if document.text == text {
+ return Ok(());
+ }
+ }
+
self.open(uri, text, language, owner, LineCol { line: 0, col: 0 });
Ok(())
}