mirror of
https://github.com/bettercap/bettercap
synced 2025-08-20 05:23:19 -07:00
fix: not printing a new line and not refreshing the prompt in events.show if no event is present.
This commit is contained in:
parent
e071788681
commit
3e8b12f08b
1 changed files with 8 additions and 5 deletions
|
@ -180,13 +180,16 @@ func (s *EventsStream) Show(limit int) error {
|
||||||
from = num - limit
|
from = num - limit
|
||||||
}
|
}
|
||||||
|
|
||||||
|
selected := events[from:num]
|
||||||
|
if len(selected) > 0 {
|
||||||
fmt.Println()
|
fmt.Println()
|
||||||
|
|
||||||
for _, e := range events[from:num] {
|
for _, e := range selected {
|
||||||
s.View(e, false)
|
s.View(e, false)
|
||||||
}
|
}
|
||||||
|
|
||||||
s.Session.Refresh()
|
s.Session.Refresh()
|
||||||
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue