diff options
| author | Kujtim Hoxha <[email protected]> | 2025-04-10 13:29:44 +0200 |
|---|---|---|
| committer | Kujtim Hoxha <[email protected]> | 2025-04-10 13:29:44 +0200 |
| commit | 36f201d5d3aaba7e0285d86cf1c0cf6b54769cff (patch) | |
| tree | 1f1c99e66df4c25f816fbfba2b1e255c94bec9ba /internal/tui/components/core | |
| parent | 0b007b9c77bc790127021a7e03c8e05ec8e5e081 (diff) | |
| download | opencode-36f201d5d3aaba7e0285d86cf1c0cf6b54769cff.tar.gz opencode-36f201d5d3aaba7e0285d86cf1c0cf6b54769cff.zip | |
fix logs and add cancellation
Diffstat (limited to 'internal/tui/components/core')
| -rw-r--r-- | internal/tui/components/core/status.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/internal/tui/components/core/status.go b/internal/tui/components/core/status.go index d67bdb7a6..93ba34507 100644 --- a/internal/tui/components/core/status.go +++ b/internal/tui/components/core/status.go @@ -13,7 +13,7 @@ import ( ) type statusCmp struct { - info *util.InfoMsg + info util.InfoMsg width int messageTTL time.Duration } @@ -35,14 +35,14 @@ func (m statusCmp) Update(msg tea.Msg) (tea.Model, tea.Cmd) { m.width = msg.Width return m, nil case util.InfoMsg: - m.info = &msg + m.info = msg ttl := msg.TTL if ttl == 0 { ttl = m.messageTTL } return m, m.clearMessageCmd(ttl) case util.ClearStatusMsg: - m.info = nil + m.info = util.InfoMsg{} } return m, nil } @@ -54,7 +54,7 @@ var ( func (m statusCmp) View() string { status := styles.Padded.Background(styles.Grey).Foreground(styles.Text).Render("? help") - if m.info != nil { + if m.info.Msg != "" { infoStyle := styles.Padded. Foreground(styles.Base). Width(m.availableFooterMsgWidth()) |
