mirror of
https://github.com/sst/opencode.git
synced 2025-07-19 05:44:59 +00:00
fix(tui): ensure viewport scrolls to bottom on new messages (#1110)
This commit is contained in:
parent
99b9390d80
commit
81c88cc742
1 changed files with 3 additions and 0 deletions
|
@ -393,6 +393,9 @@ func (m *messagesComponent) renderView() {
|
|||
|
||||
m.viewport.SetHeight(m.height - lipgloss.Height(m.header))
|
||||
m.viewport.SetContent("\n" + strings.Join(blocks, "\n\n"))
|
||||
if m.tail {
|
||||
m.viewport.GotoBottom()
|
||||
}
|
||||
}
|
||||
|
||||
func (m *messagesComponent) renderHeader() string {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue