Fix all auto-fix from clippy
This commit is contained in:
parent
c8b18c2827
commit
f50ece41eb
5 changed files with 63 additions and 105 deletions
|
|
@ -26,10 +26,9 @@ use cosmic::{
|
|||
iced::{
|
||||
Color, Element, Length, Padding, Point, Rectangle, Size, Vector,
|
||||
advanced::graphics::text::Raw,
|
||||
event::{Event, Status},
|
||||
event::Event,
|
||||
keyboard::{Event as KeyEvent, Key, Modifiers},
|
||||
mouse::{self, Button, Event as MouseEvent, ScrollDelta},
|
||||
window::RedrawRequest,
|
||||
},
|
||||
theme::Theme,
|
||||
};
|
||||
|
|
@ -863,8 +862,8 @@ where
|
|||
if is_mouse_mode {
|
||||
state.autoscroll.stop();
|
||||
} else {
|
||||
if let Some((pointer, multiplier)) = state.autoscroll.next_due() {
|
||||
if update_buffer_drag(
|
||||
if let Some((pointer, multiplier)) = state.autoscroll.next_due()
|
||||
&& update_buffer_drag(
|
||||
state,
|
||||
&mut terminal,
|
||||
buffer_size,
|
||||
|
|
@ -875,7 +874,6 @@ where
|
|||
) {
|
||||
shell.capture_event();
|
||||
}
|
||||
}
|
||||
if state.autoscroll.is_active() {
|
||||
shell.request_redraw();
|
||||
}
|
||||
|
|
@ -1319,8 +1317,8 @@ where
|
|||
}
|
||||
Event::Mouse(MouseEvent::ButtonReleased(Button::Left)) => {
|
||||
state.autoscroll.stop();
|
||||
if let Some(dragging) = state.dragging.take() {
|
||||
if let Dragging::Buffer {
|
||||
if let Some(dragging) = state.dragging.take()
|
||||
&& let Dragging::Buffer {
|
||||
last_point,
|
||||
last_side,
|
||||
..
|
||||
|
|
@ -1334,7 +1332,6 @@ where
|
|||
}
|
||||
terminal.needs_update = true;
|
||||
}
|
||||
}
|
||||
if let Some(p) = cursor_position.position_in(layout.bounds()) {
|
||||
let x = p.x - self.padding.left;
|
||||
let y = p.y - self.padding.top;
|
||||
|
|
@ -1344,14 +1341,12 @@ where
|
|||
|
||||
let location = terminal
|
||||
.viewport_to_point(TermPoint::new(row as usize, TermColumn(col as usize)));
|
||||
if state.modifiers.control() {
|
||||
if let Some(on_open_hyperlink) = &self.on_open_hyperlink {
|
||||
if let Some(hyperlink) = get_hyperlink(&terminal, location) {
|
||||
if state.modifiers.control()
|
||||
&& let Some(on_open_hyperlink) = &self.on_open_hyperlink
|
||||
&& let Some(hyperlink) = get_hyperlink(&terminal, location) {
|
||||
shell.publish(on_open_hyperlink(hyperlink));
|
||||
shell.capture_event();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if is_mouse_mode {
|
||||
terminal.report_mouse(
|
||||
|
|
@ -1655,11 +1650,10 @@ fn update_active_regex_match(
|
|||
.find(|bounds| bounds.contains(&location))
|
||||
{
|
||||
'update: {
|
||||
if let Some(active_match) = &terminal.active_regex_match {
|
||||
if active_match == match_ {
|
||||
if let Some(active_match) = &terminal.active_regex_match
|
||||
&& active_match == match_ {
|
||||
break 'update;
|
||||
}
|
||||
}
|
||||
terminal.active_regex_match = Some(match_.clone());
|
||||
terminal.needs_update = true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue