aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src/ui
diff options
context:
space:
mode:
Diffstat (limited to 'helix-term/src/ui')
-rw-r--r--helix-term/src/ui/editor.rs2
-rw-r--r--helix-term/src/ui/prompt.rs8
2 files changed, 5 insertions, 5 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)
diff --git a/helix-term/src/ui/prompt.rs b/helix-term/src/ui/prompt.rs
index 700bc8a0..19885c02 100644
--- a/helix-term/src/ui/prompt.rs
+++ b/helix-term/src/ui/prompt.rs
@@ -7,11 +7,11 @@ use std::borrow::Cow;
use std::string::String;
pub struct Prompt {
- pub prompt: String,
+ prompt: String,
pub line: String,
- pub cursor: usize,
- pub completion: Vec<Cow<'static, str>>,
- pub completion_selection_index: Option<usize>,
+ cursor: usize,
+ completion: Vec<Cow<'static, str>>,
+ completion_selection_index: Option<usize>,
completion_fn: Box<dyn FnMut(&str) -> Vec<Cow<'static, str>>>,
callback_fn: Box<dyn FnMut(&mut Editor, &str, PromptEvent)>,
}