some warnings

This commit is contained in:
Jana Dönszelmann 2026-04-04 22:50:21 +02:00
parent c867ad379e
commit 0018b27209
No known key found for this signature in database

View file

@ -72,6 +72,7 @@ const HELP_TEXT: &str = "Generic:
f toggle show active filters f toggle show active filters
z zoom in on a selected field z zoom in on a selected field
y copy the selected value to the clipboard
targeting logs: targeting logs:
@ -80,7 +81,7 @@ targeting logs:
(to target values of fields) (to target values of fields)
t the currently selected log t the currently selected log
the surrounding element (when inside a span) s the surrounding element (when inside a span)
either a field after `f` or the text of the current log: either a field after `f` or the text of the current log:
p ... with a prefix p ... with a prefix
@ -377,7 +378,19 @@ impl App {
} }
} }
KeyCode::Char('y') => { KeyCode::Char('y') => {
if let Some((_, _, value)) = lv.get_selected_field() { let value = if let Some((_, _, value)) = lv.get_selected_field() {
if let InputState::Target(InputTarget::Fields(..)) = lv.input_state {
Some(value)
} else if let Some((l, _)) = lv.selected() {
Some(l.line_text("".to_string(), &lv.filters).message)
} else {
None
}
} else {
None
};
if let Some(value) = value {
match arboard::Clipboard::new() { match arboard::Clipboard::new() {
Ok(mut cb) => { Ok(mut cb) => {
#[allow(unused_mut)] #[allow(unused_mut)]