@@ -19,7 +19,7 @@ pub type Completion = (RangeFrom<usize>, Cow<'static, str>);
20pub struct Prompt {
20pub struct Prompt {
21 prompt: Cow<'static, str>,
21 prompt: Cow<'static, str>,
22− pub line: String,
22+ line: String,
23 cursor: usize,
23 cursor: usize,
24 completion: Vec<Completion>,
24 completion: Vec<Completion>,
25 selection: Option<usize>,
25 selection: Option<usize>,
@@ -77,6 +77,10 @@ impl Prompt {
80+ pub fn line(&self) -> &String {
80 pub fn recalculate_completion(&mut self, editor: &Editor) {
84 pub fn recalculate_completion(&mut self, editor: &Editor) {
81 self.completion = (self.completion_fn)(editor, &self.line);
85 self.completion = (self.completion_fn)(editor, &self.line);