Skip to content

Commit

Permalink
add early return condition to cleanVisualCache
Browse files Browse the repository at this point in the history
  • Loading branch information
dweymouth committed Apr 5, 2024
1 parent 77b6e42 commit 6c7515e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions widget/richtext.go
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,9 @@ func (t *RichText) cachedSegmentVisual(seg RichTextSegment, offset int) fyne.Can
}

func (t *RichText) cleanVisualCache() {
if len(t.visualCache) <= len(t.Segments) {
return
}
var deletingSegs []RichTextSegment
for seg1 := range t.visualCache {
found := false
Expand Down

0 comments on commit 6c7515e

Please sign in to comment.