Skip to content

Commit

Permalink
Fixed crash on invalid filter expression
Browse files Browse the repository at this point in the history
  • Loading branch information
aurc committed Aug 11, 2022
1 parent c18bcbc commit 2382c81
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions internal/loggo/filter_view.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ func (t *FilterView) search() {
tview.NewButton("Ok").SetSelectedFunc(func() {
t.app.DismissModal()
}))
return
}
if t.filterCallback != nil {
t.filterCallback(exp)
Expand Down
6 changes: 4 additions & 2 deletions internal/loggo/log_view_readers.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,12 @@ func (l *LogView) filter() {
continue
}
now := time.Now()
if now.Sub(lastUpdate)*time.Millisecond > 500 && l.isFollowing {
if now.Sub(lastUpdate)*time.Millisecond > 500 {
lastUpdate = now
l.app.Draw()
l.table.ScrollToEnd()
if l.isFollowing {
l.table.ScrollToEnd()
}
}
}
}
Expand Down

0 comments on commit 2382c81

Please sign in to comment.