aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src/ui/editor.rs
diff options
context:
space:
mode:
authorBlaž Hrastnik2021-03-18 05:48:42 +0000
committerBlaž Hrastnik2021-03-18 05:53:29 +0000
commit8ba1e15d296fd3350332d8fa372c4c7703024a67 (patch)
tree31e7efbb2ab5a78f5521c0577f0471df77529e98 /helix-term/src/ui/editor.rs
parent2b64f49f2c5da800ceae43359c91b9708e953d18 (diff)
Expose doc.syntax() via accessor.
Diffstat (limited to 'helix-term/src/ui/editor.rs')
-rw-r--r--helix-term/src/ui/editor.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/helix-term/src/ui/editor.rs b/helix-term/src/ui/editor.rs
index 8ba6d901..5e8ef05e 100644
--- a/helix-term/src/ui/editor.rs
+++ b/helix-term/src/ui/editor.rs
@@ -90,7 +90,7 @@ impl EditorView {
// TODO: range doesn't actually restrict source, just highlight range
// TODO: cache highlight results
// TODO: only recalculate when state.doc is actually modified
- let highlights: Vec<_> = match &view.doc.syntax {
+ let highlights: Vec<_> = match view.doc.syntax() {
Some(syntax) => {
syntax
.highlight_iter(text.slice(..), Some(range), None, |_| None)