diff options
author | Michael Davis | 2023-07-26 15:26:56 +0000 |
---|---|---|
committer | Blaž Hrastnik | 2023-07-27 02:50:19 +0000 |
commit | 953073a679dfe8ae4aff86e8a9bff680d14a5523 (patch) | |
tree | 1d9dcc47314f176aee48b3e54bbd63126fd3624f /helix-term/src/ui/prompt.rs | |
parent | 98ef05d768d287fef2eb790e0a8a6e9a72832e00 (diff) |
highlighted_code_block: Take input text as &str
This removes a handful of allocations for functions calling into the
function, which is nice because the prompt may call this function on
every keypress.
Diffstat (limited to 'helix-term/src/ui/prompt.rs')
-rw-r--r-- | helix-term/src/ui/prompt.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/helix-term/src/ui/prompt.rs b/helix-term/src/ui/prompt.rs index f376b9c9..1352f493 100644 --- a/helix-term/src/ui/prompt.rs +++ b/helix-term/src/ui/prompt.rs @@ -476,7 +476,7 @@ impl Prompt { } } else if let Some((language, loader)) = self.language.as_ref() { let mut text: ui::text::Text = crate::ui::markdown::highlighted_code_block( - self.line.clone(), + &self.line, language, Some(&cx.editor.theme), loader.clone(), |