aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src/ui/prompt.rs
diff options
context:
space:
mode:
authorBlaž Hrastnik2021-11-22 02:13:22 +0000
committerBlaž Hrastnik2021-11-22 02:14:10 +0000
commit0eadeab8c7c3f1ddc794661782ebbe19ddf5311e (patch)
tree2d91e4cf8cd4bddf951c7ee1140317a37651b7f7 /helix-term/src/ui/prompt.rs
parent5f329a22c48ebf586da12323b6e1f45e9d78fdc1 (diff)
dap: Remove the prompt line parameter, use insert_str instead
Diffstat (limited to 'helix-term/src/ui/prompt.rs')
-rw-r--r--helix-term/src/ui/prompt.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/helix-term/src/ui/prompt.rs b/helix-term/src/ui/prompt.rs
index 00ffdccf..e90b0772 100644
--- a/helix-term/src/ui/prompt.rs
+++ b/helix-term/src/ui/prompt.rs
@@ -61,11 +61,10 @@ impl Prompt {
history_register: Option<char>,
mut completion_fn: impl FnMut(&str) -> Vec<Completion> + 'static,
callback_fn: impl FnMut(&mut Context, &str, PromptEvent) + 'static,
- line: Option<String>,
) -> Self {
Self {
prompt,
- line: line.unwrap_or_default(),
+ line: String::new(),
cursor: 0,
completion: completion_fn(""),
selection: None,