diff options
| author | Paul Buetow <paul@buetow.org> | 2025-06-28 12:09:06 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2025-06-28 12:09:06 +0300 |
| commit | 4ee76fb7666bcb20562cf07d95a9e7c03ed0bb86 (patch) | |
| tree | 08505a269951c4b7e3cc9288eeaa74aeecb5efd1 | |
| parent | 99280920a5bc7d655c4ca8f1f06f2c66b208986f (diff) | |
fix: enable scrolling in help screen viewport
- Fixed viewport update handling in main Update function
- Viewport now properly receives mouse and scroll events
- Content is set immediately when help is toggled
- Resolves issue where help screen couldn't scroll on small terminals
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
| -rw-r--r-- | internal/ui/keyhandlers.go | 4 | ||||
| -rw-r--r-- | internal/ui/table.go | 7 | ||||
| -rwxr-xr-x | tasksamurai | bin | 6024296 -> 6047846 bytes |
3 files changed, 8 insertions, 3 deletions
diff --git a/internal/ui/keyhandlers.go b/internal/ui/keyhandlers.go index 428f28e..419bc14 100644 --- a/internal/ui/keyhandlers.go +++ b/internal/ui/keyhandlers.go @@ -121,7 +121,9 @@ func (m *Model) handleToggleHelp() (tea.Model, tea.Cmd) { height = 20 // Default height } m.helpViewport = viewport.New(width, height) - m.helpViewport.SetContent("") // Content will be set in renderHelpScreen + // Set the content immediately + content := m.buildHelpContent() + m.helpViewport.SetContent(content) return m, nil } diff --git a/internal/ui/table.go b/internal/ui/table.go index a0a82c5..a430dcf 100644 --- a/internal/ui/table.go +++ b/internal/ui/table.go @@ -420,9 +420,12 @@ func (m *Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) { return m.handleNormalMode(msg) } - // Default case - pass through to table + // Default case - pass through to appropriate component if m.showHelp { - return m, nil + // Update help viewport for mouse wheel and other events + var cmd tea.Cmd + m.helpViewport, cmd = m.helpViewport.Update(msg) + return m, cmd } var cmd tea.Cmd diff --git a/tasksamurai b/tasksamurai Binary files differindex dff17f4..9be8bc6 100755 --- a/tasksamurai +++ b/tasksamurai |
