summaryrefslogtreecommitdiffstats
path: root/default-plugins/tab-bar/src/main.rs
diff options
context:
space:
mode:
authora-kenji <aks.kenji@protonmail.com>2022-06-10 20:03:13 +0200
committerGitHub <noreply@github.com>2022-06-10 20:03:13 +0200
commit67d2673cae60954e8287c2a1f58a21a56e066afb (patch)
tree5c469728075ea59723951c6b535253e30ebeaec4 /default-plugins/tab-bar/src/main.rs
parentbcaa6b82c5c3eec824110387b396aacae3a52e21 (diff)
add(style): add trailing comma in match blocks (#1483)
This makes it easier to distinguish from normal blocks
Diffstat (limited to 'default-plugins/tab-bar/src/main.rs')
-rw-r--r--default-plugins/tab-bar/src/main.rs16
1 files changed, 8 insertions, 8 deletions
diff --git a/default-plugins/tab-bar/src/main.rs b/default-plugins/tab-bar/src/main.rs
index a6647fcef..b11ab87c2 100644
--- a/default-plugins/tab-bar/src/main.rs
+++ b/default-plugins/tab-bar/src/main.rs
@@ -49,23 +49,23 @@ impl ZellijPlugin for State {
} else {
eprintln!("Could not find active tab.");
}
- }
+ },
Event::Mouse(me) => match me {
Mouse::LeftClick(_, col) => {
self.mouse_click_pos = col;
self.should_render = true;
- }
+ },
Mouse::ScrollUp(_) => {
switch_tab_to(min(self.active_tab_idx + 1, self.tabs.len()) as u32);
- }
+ },
Mouse::ScrollDown(_) => {
switch_tab_to(max(self.active_tab_idx.saturating_sub(1), 1) as u32);
- }
- _ => {}
+ },
+ _ => {},
},
_ => {
eprintln!("Got unrecognized event: {:?}", event);
- }
+ },
}
}
@@ -129,10 +129,10 @@ impl ZellijPlugin for State {
match background {
PaletteColor::Rgb((r, g, b)) => {
println!("{}\u{1b}[48;2;{};{};{}m\u{1b}[0K", s, r, g, b);
- }
+ },
PaletteColor::EightBit(color) => {
println!("{}\u{1b}[48;5;{}m\u{1b}[0K", s, color);
- }
+ },
}
self.should_render = false;
}