Skip to content

Commit 83ab408

Browse files
authored
Merge pull request #592 from rumpl/fix-messages-cache
Don't cache messages
2 parents 5c90898 + f5f02ea commit 83ab408

1 file changed

Lines changed: 0 additions & 5 deletions

File tree

pkg/tui/components/messages/messages.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ type renderedItem struct {
4646
id int // Message ID or index as int
4747
view string // Cached rendered content
4848
height int // Height in lines
49-
start int // Starting line position in complete content
5049
end int // Ending line position in complete content
5150
}
5251

@@ -351,7 +350,6 @@ func (m *model) ensureAllItemsRendered() {
351350
item := m.renderItem(i, view)
352351

353352
// Update position information
354-
item.start = currentPosition
355353
if item.height > 0 {
356354
item.end = currentPosition + item.height - 1
357355
} else {
@@ -370,9 +368,6 @@ func (m *model) ensureAllItemsRendered() {
370368
allLines = append(allLines, "")
371369
currentPosition += 1
372370
}
373-
374-
// Update cache with position information
375-
m.renderedItems[i] = item
376371
}
377372

378373
m.rendered = strings.Join(allLines, "\n")

0 commit comments

Comments
 (0)