From 1befbd076c0d182d7b6d9a6198054551d5ba34da Mon Sep 17 00:00:00 2001 From: Dmitry Sharshakov Date: Sat, 4 Sep 2021 22:57:58 +0300 Subject: Add command for editing breakpoint condition --- helix-term/src/ui/editor.rs | 1 + helix-term/src/ui/mod.rs | 1 + helix-term/src/ui/picker.rs | 1 + helix-term/src/ui/prompt.rs | 3 ++- 4 files changed, 5 insertions(+), 1 deletion(-) (limited to 'helix-term/src/ui') diff --git a/helix-term/src/ui/editor.rs b/helix-term/src/ui/editor.rs index a41a7d64..4681f400 100644 --- a/helix-term/src/ui/editor.rs +++ b/helix-term/src/ui/editor.rs @@ -795,6 +795,7 @@ impl EditorView { ); } }, + None, ) } diff --git a/helix-term/src/ui/mod.rs b/helix-term/src/ui/mod.rs index 0a1e24b5..37148ae2 100644 --- a/helix-term/src/ui/mod.rs +++ b/helix-term/src/ui/mod.rs @@ -70,6 +70,7 @@ pub fn regex_prompt( } } }, + None, ) } diff --git a/helix-term/src/ui/picker.rs b/helix-term/src/ui/picker.rs index 06e424ea..090ba242 100644 --- a/helix-term/src/ui/picker.rs +++ b/helix-term/src/ui/picker.rs @@ -208,6 +208,7 @@ impl Picker { |_editor: &mut Context, _pattern: &str, _event: PromptEvent| { // }, + None, ); let mut picker = Self { diff --git a/helix-term/src/ui/prompt.rs b/helix-term/src/ui/prompt.rs index 1d512ad2..56335fb3 100644 --- a/helix-term/src/ui/prompt.rs +++ b/helix-term/src/ui/prompt.rs @@ -59,10 +59,11 @@ impl Prompt { history_register: Option, mut completion_fn: impl FnMut(&str) -> Vec + 'static, callback_fn: impl FnMut(&mut Context, &str, PromptEvent) + 'static, + line: Option, ) -> Self { Self { prompt, - line: String::new(), + line: line.unwrap_or_default(), cursor: 0, completion: completion_fn(""), selection: None, -- cgit v1.2.3-70-g09d2