summaryrefslogtreecommitdiff
path: root/helix-view/src/document.rs
diff options
context:
space:
mode:
Diffstat (limited to 'helix-view/src/document.rs')
-rw-r--r--helix-view/src/document.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/helix-view/src/document.rs b/helix-view/src/document.rs
index a68ab759..351ad05a 100644
--- a/helix-view/src/document.rs
+++ b/helix-view/src/document.rs
@@ -496,7 +496,7 @@ impl Document {
if let Some(path) = &self.path {
let language_config = config_loader
.language_config_for_file_name(path)
- .or_else(|| config_loader.language_config_for_shebang(path));
+ .or_else(|| config_loader.language_config_for_shebang(self.text()));
self.set_language(theme, language_config);
}
}