diff options
| author | a-kenji <aks.kenji@protonmail.com> | 2022-06-10 20:03:13 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-06-10 20:03:13 +0200 |
| commit | 67d2673cae60954e8287c2a1f58a21a56e066afb (patch) | |
| tree | 5c469728075ea59723951c6b535253e30ebeaec4 /default-plugins/status-bar/src | |
| parent | add: typos (diff) | |
| download | sl0ppij-67d2673cae60954e8287c2a1f58a21a56e066afb.tar.gz sl0ppij-67d2673cae60954e8287c2a1f58a21a56e066afb.tar.xz sl0ppij-67d2673cae60954e8287c2a1f58a21a56e066afb.zip | |
add(style): add trailing comma in match blocks (#1483)
This makes it easier to distinguish from normal blocks
Diffstat (limited to 'default-plugins/status-bar/src')
| -rw-r--r-- | default-plugins/status-bar/src/first_line.rs | 8 | ||||
| -rw-r--r-- | default-plugins/status-bar/src/main.rs | 18 | ||||
| -rw-r--r-- | default-plugins/status-bar/src/second_line.rs | 8 | ||||
| -rw-r--r-- | default-plugins/status-bar/src/tip/cache.rs | 6 |
4 files changed, 20 insertions, 20 deletions
diff --git a/default-plugins/status-bar/src/first_line.rs b/default-plugins/status-bar/src/first_line.rs index dc7b95ec..a4fa91b8 100644 --- a/default-plugins/status-bar/src/first_line.rs +++ b/default-plugins/status-bar/src/first_line.rs @@ -261,16 +261,16 @@ fn single_letter_ctrl_key( match key.mode { CtrlKeyMode::Unselected => { unselected_mode_shortcut_single_letter(letter_shortcut, palette, separator) - } + }, CtrlKeyMode::UnselectedAlternate => { unselected_alternate_mode_shortcut_single_letter(letter_shortcut, palette, separator) - } + }, CtrlKeyMode::Selected => { selected_mode_shortcut_single_letter(letter_shortcut, palette, separator) - } + }, CtrlKeyMode::Disabled => { disabled_mode_shortcut(&format!(" {}", letter_shortcut), palette, separator) - } + }, } } diff --git a/default-plugins/status-bar/src/main.rs b/default-plugins/status-bar/src/main.rs index 4a53fed8..23ee3de7 100644 --- a/default-plugins/status-bar/src/main.rs +++ b/default-plugins/status-bar/src/main.rs @@ -237,21 +237,21 @@ impl ZellijPlugin for State { match event { Event::ModeUpdate(mode_info) => { self.mode_info = mode_info; - } + }, Event::TabUpdate(tabs) => { self.tabs = tabs; - } + }, Event::CopyToClipboard(copy_destination) => { self.text_copy_destination = Some(copy_destination); - } + }, Event::SystemClipboardFailure => { self.display_system_clipboard_failure = true; - } + }, Event::InputReceived => { self.text_copy_destination = None; self.display_system_clipboard_failure = false; - } - _ => {} + }, + _ => {}, } } @@ -284,10 +284,10 @@ impl ZellijPlugin for State { match background { PaletteColor::Rgb((r, g, b)) => { println!("{}\u{1b}[48;2;{};{};{}m\u{1b}[0K", first_line, r, g, b); - } + }, PaletteColor::EightBit(color) => { println!("{}\u{1b}[48;5;{}m\u{1b}[0K", first_line, color); - } + }, } println!("\u{1b}[m{}\u{1b}[0K", second_line); } @@ -319,7 +319,7 @@ impl State { InputMode::Normal => floating_panes_are_visible(&self.mode_info.style.colors), InputMode::Locked => { locked_floating_panes_are_visible(&self.mode_info.style.colors) - } + }, _ => keybinds(&self.mode_info, &self.tip_name, cols), } } else { diff --git a/default-plugins/status-bar/src/second_line.rs b/default-plugins/status-bar/src/second_line.rs index 9b654033..56a71e4b 100644 --- a/default-plugins/status-bar/src/second_line.rs +++ b/default-plugins/status-bar/src/second_line.rs @@ -224,7 +224,7 @@ fn shortened_shortcut_list(help: &ModeInfo, tip: TipFn) -> LinePart { InputMode::Tmux => short_tmux_mode_indication(help), InputMode::RenamePane => { shortened_shortcut_list_nonstandard_mode(select_pane_shortcut)(help) - } + }, _ => shortened_shortcut_list_nonstandard_mode(confirm_pane_selection)(help), } } @@ -279,7 +279,7 @@ fn best_effort_shortcut_list(help: &ModeInfo, tip: TipFn, max_len: usize) -> Lin } else { LinePart::default() } - } + }, InputMode::Locked => { let line_part = locked_interface_indication(help.style.colors); if line_part.len <= max_len { @@ -287,11 +287,11 @@ fn best_effort_shortcut_list(help: &ModeInfo, tip: TipFn, max_len: usize) -> Lin } else { LinePart::default() } - } + }, InputMode::Tmux => best_effort_tmux_shortcut_list(help, max_len), InputMode::RenamePane => { best_effort_shortcut_list_nonstandard_mode(select_pane_shortcut)(help, max_len) - } + }, _ => best_effort_shortcut_list_nonstandard_mode(confirm_pane_selection)(help, max_len), } } diff --git a/default-plugins/status-bar/src/tip/cache.rs b/default-plugins/status-bar/src/tip/cache.rs index dece8243..e62e658d 100644 --- a/default-plugins/status-bar/src/tip/cache.rs +++ b/default-plugins/status-bar/src/tip/cache.rs @@ -47,7 +47,7 @@ impl LocalCache { }); } Err(LocalCacheError::Serde(err)) - } + }, } } @@ -64,7 +64,7 @@ impl LocalCache { let metadata = LocalCache::from_json(&json_cache)?; Ok(LocalCache { path, metadata }) - } + }, Err(e) => Err(LocalCacheError::IoPath(e, path)), } } @@ -77,7 +77,7 @@ impl LocalCache { file.write_all(json_cache.as_bytes()) .map_err(LocalCacheError::Io)?; Ok(()) - } + }, Err(e) => Err(LocalCacheError::Serde(e)), } } |
