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/menu.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/menu.rs')
-rw-r--r-- | helix-term/src/ui/menu.rs | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/helix-term/src/ui/menu.rs b/helix-term/src/ui/menu.rs index bf18b92b..226c1135 100644 --- a/helix-term/src/ui/menu.rs +++ b/helix-term/src/ui/menu.rs @@ -4,16 +4,10 @@ use tui::{buffer::Buffer as Surface, widgets::Table}; pub use tui::widgets::{Cell, Row}; -use std::borrow::Cow; - use fuzzy_matcher::skim::SkimMatcherV2 as Matcher; use fuzzy_matcher::FuzzyMatcher; -use helix_core::Position; -use helix_view::{ - graphics::{Color, Rect, Style}, - Editor, -}; +use helix_view::{graphics::Rect, Editor}; pub trait Item { // TODO: sort_text @@ -64,7 +58,6 @@ impl<T: Item> Menu<T> { pub fn score(&mut self, pattern: &str) { // need to borrow via pattern match otherwise it complains about simultaneous borrow let Self { - ref mut options, ref mut matcher, ref mut matches, .. @@ -297,7 +290,7 @@ impl<T: Item + 'static> Component for Menu<T> { // ) // } - for (i, option) in (scroll..(scroll + win_height).min(len)).enumerate() { + for (i, _) in (scroll..(scroll + win_height).min(len)).enumerate() { let is_marked = i >= scroll_line && i < scroll_line + scroll_height; if is_marked { |