mirror of
https://codeberg.org/icewind/logsmash.git
synced 2026-06-03 10:04:12 +02:00
fix filtered grouped log view
This commit is contained in:
parent
4af0bcb512
commit
758a4fa5e3
1 changed files with 8 additions and 1 deletions
|
|
@ -38,8 +38,15 @@ impl StatefulWidget for GroupedLogs<'_> {
|
|||
where
|
||||
Self: Sized,
|
||||
{
|
||||
let line = &self.app.lines[self.lines[state.selected()]];
|
||||
let lines = self.lines.iter().copied().map(|i| &self.app.lines[i]);
|
||||
let line = self
|
||||
.lines
|
||||
.iter()
|
||||
.copied()
|
||||
.map(|i| &self.app.lines[i])
|
||||
.filter(|line| line.matches(self.filter))
|
||||
.nth(state.selected())
|
||||
.unwrap_or(&self.app.lines[0]);
|
||||
|
||||
let par = match self.grouping {
|
||||
GroupedLogGrouping::Message => Paragraph::new(format!(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue