aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src/ui
diff options
context:
space:
mode:
authorBlaž Hrastnik2021-03-22 03:40:07 +0000
committerBlaž Hrastnik2021-03-22 03:40:07 +0000
commitcbcacb1063c9b6384867a6078a75595ae2ff6861 (patch)
tree0b1b48b06eacd14a1ac0eb06581d79b92a01e573 /helix-term/src/ui
parentc4792efead160859d17f8ca969869037b7d2e1d5 (diff)
Merge some imports.
Diffstat (limited to 'helix-term/src/ui')
-rw-r--r--helix-term/src/ui/editor.rs10
-rw-r--r--helix-term/src/ui/markdown.rs2
-rw-r--r--helix-term/src/ui/menu.rs2
-rw-r--r--helix-term/src/ui/picker.rs2
-rw-r--r--helix-term/src/ui/popup.rs8
-rw-r--r--helix-term/src/ui/prompt.rs3
-rw-r--r--helix-term/src/ui/text.rs2
7 files changed, 16 insertions, 13 deletions
diff --git a/helix-term/src/ui/editor.rs b/helix-term/src/ui/editor.rs
index 670de6d6..3ee9d446 100644
--- a/helix-term/src/ui/editor.rs
+++ b/helix-term/src/ui/editor.rs
@@ -1,7 +1,9 @@
-use crate::commands;
-use crate::compositor::{Component, Compositor, Context, EventResult};
-use crate::keymap::{self, Keymaps};
-use crate::ui::text_color;
+use crate::{
+ commands,
+ compositor::{Component, Compositor, Context, EventResult},
+ keymap::{self, Keymaps},
+ ui::text_color,
+};
use helix_core::{
indent::TAB_WIDTH,
diff --git a/helix-term/src/ui/markdown.rs b/helix-term/src/ui/markdown.rs
index 5e184ba3..e41f9765 100644
--- a/helix-term/src/ui/markdown.rs
+++ b/helix-term/src/ui/markdown.rs
@@ -1,7 +1,7 @@
use crate::compositor::{Component, Compositor, Context, EventResult};
use crossterm::event::{Event, KeyCode, KeyEvent, KeyModifiers};
-use tui::buffer::Buffer as Surface;
use tui::{
+ buffer::Buffer as Surface,
layout::Rect,
style::{Color, Style},
text::Text,
diff --git a/helix-term/src/ui/menu.rs b/helix-term/src/ui/menu.rs
index 0fdf085f..e9893588 100644
--- a/helix-term/src/ui/menu.rs
+++ b/helix-term/src/ui/menu.rs
@@ -1,7 +1,7 @@
use crate::compositor::{Component, Compositor, Context, EventResult};
use crossterm::event::{Event, KeyCode, KeyEvent, KeyModifiers};
-use tui::buffer::Buffer as Surface;
use tui::{
+ buffer::Buffer as Surface,
layout::Rect,
style::{Color, Style},
widgets::{Block, Borders},
diff --git a/helix-term/src/ui/picker.rs b/helix-term/src/ui/picker.rs
index d8da052a..853164c5 100644
--- a/helix-term/src/ui/picker.rs
+++ b/helix-term/src/ui/picker.rs
@@ -1,7 +1,7 @@
use crate::compositor::{Component, Compositor, Context, EventResult};
use crossterm::event::{Event, KeyCode, KeyEvent, KeyModifiers};
-use tui::buffer::Buffer as Surface;
use tui::{
+ buffer::Buffer as Surface,
layout::Rect,
style::{Color, Style},
widgets::{Block, Borders},
diff --git a/helix-term/src/ui/popup.rs b/helix-term/src/ui/popup.rs
index 572c651b..98ccae61 100644
--- a/helix-term/src/ui/popup.rs
+++ b/helix-term/src/ui/popup.rs
@@ -1,7 +1,7 @@
use crate::compositor::{Component, Compositor, Context, EventResult};
use crossterm::event::{Event, KeyCode, KeyEvent, KeyModifiers};
-use tui::buffer::Buffer as Surface;
use tui::{
+ buffer::Buffer as Surface,
layout::Rect,
style::{Color, Style},
widgets::{Block, Borders},
@@ -107,8 +107,10 @@ impl Component for Popup {
}
fn render(&self, viewport: Rect, surface: &mut Surface, cx: &mut Context) {
- use tui::text::Text;
- use tui::widgets::{Paragraph, Widget, Wrap};
+ use tui::{
+ text::Text,
+ widgets::{Paragraph, Widget, Wrap},
+ };
cx.scroll = Some(self.scroll);
diff --git a/helix-term/src/ui/prompt.rs b/helix-term/src/ui/prompt.rs
index 35890b4c..db691f50 100644
--- a/helix-term/src/ui/prompt.rs
+++ b/helix-term/src/ui/prompt.rs
@@ -1,8 +1,7 @@
use crate::compositor::{Component, Compositor, Context, EventResult};
use crossterm::event::{Event, KeyCode, KeyEvent, KeyModifiers};
use helix_core::Position;
-use helix_view::Editor;
-use helix_view::Theme;
+use helix_view::{Editor, Theme};
use std::{borrow::Cow, ops::RangeFrom};
pub struct Prompt {
diff --git a/helix-term/src/ui/text.rs b/helix-term/src/ui/text.rs
index 9db4d3bc..588e12c4 100644
--- a/helix-term/src/ui/text.rs
+++ b/helix-term/src/ui/text.rs
@@ -1,7 +1,7 @@
use crate::compositor::{Component, Compositor, Context, EventResult};
use crossterm::event::{Event, KeyCode, KeyEvent, KeyModifiers};
-use tui::buffer::Buffer as Surface;
use tui::{
+ buffer::Buffer as Surface,
layout::Rect,
style::{Color, Style},
};