summaryrefslogtreecommitdiffhomepage
path: root/packages/tui/internal/app
diff options
context:
space:
mode:
authorAiden Cline <[email protected]>2025-08-19 22:39:59 -0500
committerGitHub <[email protected]>2025-08-19 22:39:59 -0500
commit574be9febf74e9571c0400bfc6de33f5deede977 (patch)
treea5f0a538d1e54fec9d06ac50d2181074688946d3 /packages/tui/internal/app
parent5b05ede748095865d3dc3a69790b01da92f1e6dd (diff)
downloadopencode-574be9febf74e9571c0400bfc6de33f5deede977.tar.gz
opencode-574be9febf74e9571c0400bfc6de33f5deede977.zip
fix: keybind panic (#2092)
Diffstat (limited to 'packages/tui/internal/app')
-rw-r--r--packages/tui/internal/app/app.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/packages/tui/internal/app/app.go b/packages/tui/internal/app/app.go
index af8157adc..0c703c959 100644
--- a/packages/tui/internal/app/app.go
+++ b/packages/tui/internal/app/app.go
@@ -207,6 +207,9 @@ func New(
func (a *App) Keybind(commandName commands.CommandName) string {
command := a.Commands[commandName]
+ if len(command.Keybindings) == 0 {
+ return ""
+ }
kb := command.Keybindings[0]
key := kb.Key
if kb.RequiresLeader {