aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src/ui/prompt.rs
diff options
context:
space:
mode:
Diffstat (limited to 'helix-term/src/ui/prompt.rs')
-rw-r--r--helix-term/src/ui/prompt.rs16
1 files changed, 6 insertions, 10 deletions
diff --git a/helix-term/src/ui/prompt.rs b/helix-term/src/ui/prompt.rs
index 63078c39..6bb1b006 100644
--- a/helix-term/src/ui/prompt.rs
+++ b/helix-term/src/ui/prompt.rs
@@ -1,14 +1,17 @@
use crate::compositor::{Component, Compositor, Context, EventResult};
use crate::ui;
use crossterm::event::{Event, KeyCode, KeyEvent, KeyModifiers};
-use helix_core::Position;
-use helix_view::{Editor, Theme};
use std::{borrow::Cow, ops::RangeFrom};
-use tui::terminal::CursorKind;
+use tui::buffer::Buffer as Surface;
use helix_core::{
unicode::segmentation::{GraphemeCursor, GraphemeIncomplete},
unicode::width::UnicodeWidthStr,
+ Position,
+};
+use helix_view::{
+ graphics::{Color, CursorKind, Margin, Modifier, Rect, Style},
+ Editor, Theme,
};
pub type Completion = (RangeFrom<usize>, Cow<'static, str>);
@@ -251,12 +254,6 @@ impl Prompt {
}
}
-use tui::{
- buffer::Buffer as Surface,
- layout::Rect,
- style::{Color, Modifier, Style},
-};
-
const BASE_WIDTH: u16 = 30;
impl Prompt {
@@ -343,7 +340,6 @@ impl Prompt {
let background = theme.get("ui.help");
surface.clear_with(area, background);
- use tui::layout::Margin;
text.render(
area.inner(&Margin {
vertical: 1,