diff options
author | Blaž Hrastnik | 2022-02-17 04:56:01 +0000 |
---|---|---|
committer | Blaž Hrastnik | 2022-02-17 05:02:42 +0000 |
commit | 24f90ba8d8f4a10fb18f71b05c278fe89b71a261 (patch) | |
tree | e930c0634c4b2035889bfa32a0a009d23c45baf4 /helix-term/src/ui | |
parent | af21e2a5b491a18b22de7c99d96536bdaf741056 (diff) |
Manually recalculate initial completion where it matters
Diffstat (limited to 'helix-term/src/ui')
-rw-r--r-- | helix-term/src/ui/mod.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/helix-term/src/ui/mod.rs b/helix-term/src/ui/mod.rs index e9ff9d1a..e269c8ed 100644 --- a/helix-term/src/ui/mod.rs +++ b/helix-term/src/ui/mod.rs @@ -38,7 +38,7 @@ pub fn regex_prompt( let snapshot = doc.selection(view_id).clone(); let offset_snapshot = view.offset; - Prompt::new( + let mut prompt = Prompt::new( prompt, history_register, completion_fn, @@ -91,7 +91,10 @@ pub fn regex_prompt( } } }, - ) + ); + // Calculate initial completion + prompt.recalculate_completion(cx.editor); + prompt } pub fn file_picker(root: PathBuf, config: &helix_view::editor::Config) -> FilePicker<PathBuf> { |