mirror of
https://codeberg.org/icewind/logsmash.git
synced 2026-06-03 18:14:11 +02:00
fix selecting last match if there are no unmatched lines
Some checks failed
CI / check (push) Failing after 7s
CI / check-extractor (push) Failing after 2s
CI / clippy (push) Has been skipped
CI / build (x86_64-pc-windows-gnu) (push) Has been skipped
CI / build (x86_64-unknown-linux-gnu) (push) Has been skipped
CI / build (x86_64-unknown-linux-musl) (push) Has been skipped
CI / build-nixpkgs (push) Has been skipped
Some checks failed
CI / check (push) Failing after 7s
CI / check-extractor (push) Failing after 2s
CI / clippy (push) Has been skipped
CI / build (x86_64-pc-windows-gnu) (push) Has been skipped
CI / build (x86_64-unknown-linux-gnu) (push) Has been skipped
CI / build (x86_64-unknown-linux-musl) (push) Has been skipped
CI / build-nixpkgs (push) Has been skipped
This commit is contained in:
parent
0eb22ccd20
commit
cea03a8f4f
1 changed files with 3 additions and 3 deletions
|
|
@ -31,10 +31,10 @@ impl<'a> MatchListState<'a> {
|
|||
fn enter(self, selected: usize, app: &'a App) -> UiState<'a> {
|
||||
let result = if selected == 0 {
|
||||
&app.all
|
||||
} else if selected == app.match_lines() - 1 {
|
||||
&app.unmatched
|
||||
} else {
|
||||
} else if selected <= app.matches.len() {
|
||||
&app.matches[selected - 1]
|
||||
} else {
|
||||
&app.unmatched
|
||||
};
|
||||
let table_state = ScrollbarTableState::new(result.grouped.len());
|
||||
UiState::Match(MatchState {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue