mirror of
https://codeberg.org/icewind/logsmash.git
synced 2026-06-03 18:14:11 +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
|
where
|
||||||
Self: Sized,
|
Self: Sized,
|
||||||
{
|
{
|
||||||
let line = &self.app.lines[self.lines[state.selected()]];
|
|
||||||
let lines = self.lines.iter().copied().map(|i| &self.app.lines[i]);
|
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 {
|
let par = match self.grouping {
|
||||||
GroupedLogGrouping::Message => Paragraph::new(format!(
|
GroupedLogGrouping::Message => Paragraph::new(format!(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue