summaryrefslogtreecommitdiffstats
path: root/src/ui
diff options
context:
space:
mode:
authorJeff Zhao <jeff.no.zhao@gmail.com>2021-02-21 09:54:47 -0500
committerJeff Zhao <jeff.no.zhao@gmail.com>2021-02-21 09:54:47 -0500
commit2cddd505080a3c0c5cd71892e32e521ec541967b (patch)
treeb785f55348df017c5bc41e30df55a10c0f710e31 /src/ui
parent73e532152139e9d121e24a2d11cdece689e4fce9 (diff)
remove some code
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/views/tui_textfield.rs2
-rw-r--r--src/ui/widgets/tui_text.rs5
2 files changed, 2 insertions, 5 deletions
diff --git a/src/ui/views/tui_textfield.rs b/src/ui/views/tui_textfield.rs
index 9262ec9..c341724 100644
--- a/src/ui/views/tui_textfield.rs
+++ b/src/ui/views/tui_textfield.rs
@@ -4,7 +4,7 @@ use rustyline::line_buffer;
use termion::event::{Event, Key};
use tui::layout::Rect;
use tui::widgets::Clear;
-use unicode_width::{UnicodeWidthChar, UnicodeWidthStr};
+use unicode_width::UnicodeWidthStr;
use crate::context::JoshutoContext;
use crate::ui::views::TuiView;
diff --git a/src/ui/widgets/tui_text.rs b/src/ui/widgets/tui_text.rs
index ba9cc36..7fa6935 100644
--- a/src/ui/widgets/tui_text.rs
+++ b/src/ui/widgets/tui_text.rs
@@ -24,9 +24,6 @@ impl<'a> TuiMultilineText<'a> {
// to clean this up more
let default_style = Style::default().fg(Color::Reset).bg(Color::Reset);
- let cursor_style = Style::default()
- .fg(Color::White)
- .add_modifier(Modifier::REVERSED);
let s_width = s.width();
if s_width < area_width {
@@ -51,7 +48,7 @@ impl<'a> TuiMultilineText<'a> {
let mut start = 0;
let mut line_width = 0;
- for (i, c, w) in s.char_indices().filter_map(filter) {
+ for (i, _, w) in s.char_indices().filter_map(filter) {
if line_width + w < area_width {
line_width += w;
continue;