Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'helix-term/src/ui/markdown.rs')
| -rw-r--r-- | helix-term/src/ui/markdown.rs | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/helix-term/src/ui/markdown.rs b/helix-term/src/ui/markdown.rs index ac948ace..830f59a1 100644 --- a/helix-term/src/ui/markdown.rs +++ b/helix-term/src/ui/markdown.rs @@ -1,8 +1,5 @@ use crate::compositor::{Component, RenderContext}; -use tui::{ - buffer::Buffer as Surface, - text::{Span, Spans, Text}, -}; +use tui::text::{Span, Spans, Text}; use std::sync::Arc; @@ -259,7 +256,7 @@ impl Markdown { } impl Component for Markdown { - fn render(&mut self, area: Rect, surface: &mut Surface, cx: &mut RenderContext<'_>) { + fn render(&mut self, area: Rect, cx: &mut RenderContext<'_>) { use tui::widgets::{Paragraph, Widget, Wrap}; let text = self.parse(Some(&cx.editor.theme)); @@ -272,7 +269,7 @@ impl Component for Markdown { vertical: 1, horizontal: 1, }; - par.render(area.inner(&margin), surface); + par.render(area.inner(&margin), cx.surface); } fn required_size(&mut self, viewport: (u16, u16)) -> Option<(u16, u16)> { |