aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src/ui/prompt.rs
diff options
context:
space:
mode:
Diffstat (limited to 'helix-term/src/ui/prompt.rs')
-rw-r--r--helix-term/src/ui/prompt.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/helix-term/src/ui/prompt.rs b/helix-term/src/ui/prompt.rs
index 7197adea..1d512ad2 100644
--- a/helix-term/src/ui/prompt.rs
+++ b/helix-term/src/ui/prompt.rs
@@ -15,7 +15,7 @@ use helix_view::{
pub type Completion = (RangeFrom<usize>, Cow<'static, str>);
pub struct Prompt {
- prompt: String,
+ prompt: Cow<'static, str>,
pub line: String,
cursor: usize,
completion: Vec<Completion>,
@@ -55,7 +55,7 @@ pub enum Movement {
impl Prompt {
pub fn new(
- prompt: String,
+ prompt: Cow<'static, str>,
history_register: Option<char>,
mut completion_fn: impl FnMut(&str) -> Vec<Completion> + 'static,
callback_fn: impl FnMut(&mut Context, &str, PromptEvent) + 'static,