chore: Fix several style lints (#17488)
It's not comprehensive enough to start linting on `style` group, but hey, it's a start. Release Notes: - N/A
This commit is contained in:
parent
93249fc82b
commit
e6c1c51b37
361 changed files with 3530 additions and 3587 deletions
|
@ -11,14 +11,14 @@ use gpui::{px, Modifiers, MouseButton, MouseMoveEvent, Pixels, Point, ScrollWhee
|
|||
use crate::TerminalSize;
|
||||
|
||||
enum MouseFormat {
|
||||
SGR,
|
||||
Sgr,
|
||||
Normal(bool),
|
||||
}
|
||||
|
||||
impl MouseFormat {
|
||||
fn from_mode(mode: TermMode) -> Self {
|
||||
if mode.contains(TermMode::SGR_MOUSE) {
|
||||
MouseFormat::SGR
|
||||
MouseFormat::Sgr
|
||||
} else if mode.contains(TermMode::UTF8_MOUSE) {
|
||||
MouseFormat::Normal(true)
|
||||
} else {
|
||||
|
@ -77,10 +77,7 @@ impl AlacMouseButton {
|
|||
}
|
||||
|
||||
fn is_other(&self) -> bool {
|
||||
match self {
|
||||
AlacMouseButton::Other => true,
|
||||
_ => false,
|
||||
}
|
||||
matches!(self, AlacMouseButton::Other)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -219,7 +216,7 @@ fn mouse_report(
|
|||
}
|
||||
|
||||
match format {
|
||||
MouseFormat::SGR => {
|
||||
MouseFormat::Sgr => {
|
||||
Some(sgr_mouse_report(point, button as u8 + mods, pressed).into_bytes())
|
||||
}
|
||||
MouseFormat::Normal(utf8) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue