diff options
author | Nathan Vegdahl | 2021-07-02 02:37:28 +0000 |
---|---|---|
committer | Nathan Vegdahl | 2021-07-02 02:37:28 +0000 |
commit | 2224a1527ec9592f16131b0aa3923fc3d37592e7 (patch) | |
tree | 2a08b053cb32cef9dc1db5895778d419ebaebb5b /helix-term/src/ui/text.rs | |
parent | e725957704274b1ec814a34ddf6f75faf35358e7 (diff) | |
parent | 9f62ad0715240156b512dfc7c584d2d0df05a664 (diff) |
Merge branch 'master' into great_line_ending_and_cursor_range_cleanup
Diffstat (limited to 'helix-term/src/ui/text.rs')
-rw-r--r-- | helix-term/src/ui/text.rs | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/helix-term/src/ui/text.rs b/helix-term/src/ui/text.rs index 7c491841..249cf89e 100644 --- a/helix-term/src/ui/text.rs +++ b/helix-term/src/ui/text.rs @@ -1,14 +1,7 @@ -use crate::compositor::{Component, Compositor, Context, EventResult}; -use crossterm::event::{Event, KeyCode, KeyEvent, KeyModifiers}; +use crate::compositor::{Component, Context}; use tui::buffer::Buffer as Surface; -use std::borrow::Cow; - -use helix_core::Position; -use helix_view::{ - graphics::{Color, Rect, Style}, - Editor, -}; +use helix_view::graphics::Rect; pub struct Text { contents: String, @@ -20,12 +13,10 @@ impl Text { } } impl Component for Text { - fn render(&self, area: Rect, surface: &mut Surface, cx: &mut Context) { + fn render(&self, area: Rect, surface: &mut Surface, _cx: &mut Context) { use tui::widgets::{Paragraph, Widget, Wrap}; let contents = tui::text::Text::from(self.contents.clone()); - let style = cx.editor.theme.get("ui.text"); - let par = Paragraph::new(contents).wrap(Wrap { trim: false }); // .scroll(x, y) offsets |