diff options
| author | adamdotdevin <[email protected]> | 2025-08-25 11:32:15 -0500 |
|---|---|---|
| committer | adamdotdevin <[email protected]> | 2025-08-25 11:32:15 -0500 |
| commit | 836c2060c7d5d0a67ee3b347ad4bf0dc73f9ca0f (patch) | |
| tree | 030434179ec1d73269b66d0ddc323488fdc0d650 | |
| parent | 6357136ca51935ac130f2774109b8120bf151246 (diff) | |
| download | opencode-836c2060c7d5d0a67ee3b347ad4bf0dc73f9ca0f.tar.gz opencode-836c2060c7d5d0a67ee3b347ad4bf0dc73f9ca0f.zip | |
fix(tui): sort custom commands lower
| -rw-r--r-- | packages/tui/internal/commands/command.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/packages/tui/internal/commands/command.go b/packages/tui/internal/commands/command.go index ae34f4b52..d552b78ec 100644 --- a/packages/tui/internal/commands/command.go +++ b/packages/tui/internal/commands/command.go @@ -92,12 +92,12 @@ func (r CommandRegistry) Sorted() []Command { if b.Name == AppExitCommand { return -1 } - if a.Custom { - return -1 - } - if b.Custom { + if a.Custom && !b.Custom { return 1 } + if !a.Custom && b.Custom { + return -1 + } return strings.Compare(string(a.Name), string(b.Name)) }) |
