Skip to content

Commit

Permalink
fix off-by-1 bug
Browse files Browse the repository at this point in the history
  • Loading branch information
lqs committed Oct 2, 2023
1 parent 2f7dc9f commit 6044954
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ui/goroutinelist.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ func (g *GoroutineListView) Apply(callStacks []*common.CallStack) {
} else {
g.SetTitle(" Threads (" + strconv.Itoa(len(g.indexToGoroutine)-1) + ") ")
}
for g.GetRowCount() > g.currentRow+1 {
for g.GetRowCount() >= g.currentRow+1 {
g.RemoveRow(g.GetRowCount() - 1)
}
if row, _ := g.GetSelection(); row <= 0 || row >= g.currentRow+1 {
Expand Down

0 comments on commit 6044954

Please sign in to comment.