From d84f8b5fdef71da87ee108db07ba1167fc6a769b Mon Sep 17 00:00:00 2001 From: Gokul Soumya Date: Thu, 12 Aug 2021 12:30:42 +0530 Subject: Show file preview in split pane in fuzzy finder (#534) * Add preview pane for fuzzy finder * Fix picker preview lag by caching * Add picker preview for document symbols * Cache picker preview per document instead of view * Use line instead of range for preview doc * Add picker preview for buffer picker * Fix render bug and refactor picker * Refactor picker preview rendering * Split picker and preview and compose The current selected item is cloned on every event, which is undesirable * Refactor out clones in previewed picker * Retrieve doc from editor if possible in filepicker * Disable syntax highlight for picker preview Files already loaded in memory have syntax highlighting enabled * Ignore directory symlinks in file picker * Cleanup unnecessary pubs and derives * Remove unnecessary highlight from file picker * Reorganize buffer rendering * Use normal picker for code actions * Remove unnecessary generics and trait impls * Remove prepare_for_render and make render mutable * Skip picker preview if screen small, less padding--- helix-term/src/ui/markdown.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'helix-term/src/ui/markdown.rs') diff --git a/helix-term/src/ui/markdown.rs b/helix-term/src/ui/markdown.rs index 6c79ca67..b7e29f21 100644 --- a/helix-term/src/ui/markdown.rs +++ b/helix-term/src/ui/markdown.rs @@ -198,7 +198,7 @@ fn parse<'a>( Text::from(lines) } impl Component for Markdown { - fn render(&self, area: Rect, surface: &mut Surface, cx: &mut Context) { + fn render(&mut self, area: Rect, surface: &mut Surface, cx: &mut Context) { use tui::widgets::{Paragraph, Widget, Wrap}; let text = parse(&self.contents, Some(&cx.editor.theme), &self.config_loader); -- cgit v1.2.3-70-g09d2